not evaluate html from sql?

B

bouy78

quick question..I have some html in an mssql db and i want to
response.write it without the tags being evaluated....????
 
M

Mike Brind

quick question..I have some html in an mssql db and i want to
response.write it without the tags being evaluated....????

output = Replace(output,"<","&lt;")
output = Replace(output,">","&gt;")
Response.Write output

The second replace operation probably isn't strictly necessary.....
 
B

Bob Barrows [MVP]

quick question..I have some html in an mssql db and i want to
response.write it without the tags being evaluated....????
response.write server.htmlencode(yourtext)
 
B

bouy78

Bob said:
response.write server.htmlencode(yourtext)
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

sweet..thanks
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top