1

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...

Saravanan
  • 11,372
  • 43
  • 143
  • 213

4 Answers4

2

This is not possible with the standard textarea.

You will need a rich text edit box. There are lot of editors available for this.

Take a look at

Tiny MCE

or

jQuery based CLEditor

nunespascal
  • 17,584
  • 2
  • 43
  • 46
0

Textbox used in general are limited in their functionality so in order to get additional editing and features, you must go through the functionality of Richtextbox. I think this link might help: Richtextbox

Incredible
  • 3,495
  • 8
  • 49
  • 77
0

Well you cannot display a table inside TextArea but you can surely set it's css to display text in bold & italics.

You can use textarea{ font-weight: bold; font-style:italic; }

You can use TinyMCE as mentioned by nunespascal, alternatively you can use div to look like a textarea, please check the below link.

How do I make an editable DIV look like a text field?

Community
  • 1
  • 1
Ravi Vanapalli
  • 9,805
  • 3
  • 33
  • 43
0

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...

Saravanan
  • 11,372
  • 43
  • 143
  • 213