Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

enable HTML in web Forms

Status
Not open for further replies.

ralphtrent

Programmer
Jun 2, 2003
958
US
Hello
I would like to enable HTML in my forms. Here is more info. I have a textarea, where a person enters data that will be stored in a database. If they want to use <b> they can, but when it gets printed out it gets printed out as <b> not bolded. The resons why is because I had to replace < and > with thier ASCII codes (+lt and +gt), reason being, someone actually wanted the brackets as part of their submission, so when the data is pulled from the database it is read as +ltb+gt hello +lt/b+gt. My questions is, is there a way to only ascii code the <> that are not known html tags with out having to do a whole lot of work? if I so not replace the <> with the code, the asp page sees <extu> (lets say thats what the user entered) as an HTML tag and will not display it properly. I know this is confusing, so if you need me to explain it better, i can try.

Ralph
PS I had to replace the & with in lt and gt with + so you can get a better understanding of what was happening. When I previewed my post with the & it was publishing < and >
 
You might still convert < to &lt; but also have a system for a few tags where a user can use and for bold and then you would Replace() those with <b> and </b>.

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
ASP design tips, demo database on the Web, free barchart tool...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top