Reputation: 11612
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...
Upvotes: 1
Views: 5672
Reputation: 11612
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...
Upvotes: 0
Reputation: 9950
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?
Upvotes: 0
Reputation: 3671
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
Upvotes: 0
Reputation: 17724
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
or
jQuery based CLEditor
Upvotes: 2