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

2
  • what about Html encoding and decoding ? Commented Sep 17, 2012 at 6:30
  • @Jodha:Can you explain more about it Commented Sep 17, 2012 at 6:38

4 Answers 4

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

Sign up to request clarification or add additional context in comments.

Comments

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

Comments

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?

Comments

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.