Textbox formatting

  • Thread starter Thread starter shail
  • Start date Start date
S

shail

I have a TextBox(multiline) in which I want to display
HTML Formatted Text. The text is suppilied to textbox by
a database and it consist of Tags like <>, the tags are
HTML encode Automatically so instead of interperating
tags as HTML, tags are interperated as Text itself.
What should I do?
Thanks
 
If I understand you correctly, you want to display the text as it would
display on an html page but inside of a text box. (e.g. if the text has bold
tags around it <b>My Text</b> it should appear bold in the text box)

Text boxes are rendered as normal <input> controls on the page. Text won't
display that way inside of a text box.

You may want to create your own "text box" using a table cell or css borders
so that you get the display effect you want.

If I'm wrong about what your end result should be then I would look at the
Server.HtmlEncode and Server.HtmlDecode methods which could help you display
the text inside of the text box as: "<b>My Text</b>"

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
Back
Top