views:

71

answers:

1

Using DataList, it's not possible to collect data into a <textarea></textarea> HTML tag. Because Visual Studio automaticly adds table and so td and shows data in these HTML tags.

I want to show bunch of "added tags" in a passive-looking <textarea>. How can I do it? Is it possible to use data piece by piece WITHOUT any pre-constructed HTML tag. I don't want any td...

How to do that?

Thanks.

+1  A: 

Use a repeater :

<asp:Repeater runat="server" id="rpGeneratedTags">
  <headertemplate>
    <textarea name="generatedTags">
  </headertemplate>
  <footertemplate>
    </textarea>
  </footertemplate>
  <itemtemplate>
    <%# System.Web.HttpUtility.HtmlEncode((string)Eval("Tag") %#>
  </itemtemplate>
</asp:Repeater>
Florian Doyon
Thank you for answer :o)
scaryguy