Textbox formatting

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
 
S

S. Justin Gengo

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top