Search code examples
c#asp.net.nethtmlasp.net-controls

how to display html text inside the textarea control in asp.net[.net 4 framework]?


I have added one submit button and one textArea control in asp.net(4 framework) page.Whenever user clicks submit button, then i will get some html text and needs to display it in the textArea control.

for example: (i) <B><I>some text</I></B> then i have to display the text with BOLD and ITALIC style in the textArea contol

(ii) Also, needs to display Html TABLE inside the textArea control.

I dont know is this possible or not...

Please guide me to get out of this issue...


Solution

  • We can use literal control for this requirement.

      <asp:Literal id="literal1" Text="I love ASP!" runat="server" />
    

    In C#,

       literal1.text=htmlString;
    

    It is working good for me...