Welcome to WebmasterWorld Guest from 18.104.22.168 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
Adding html tags to string SQL output to web LinuxGold
I use SQL output to create a drop-down list and to validate my web page. I'm trying to figure out a way to convert special chars into html code i.e. & to & and so on. What is the ASP syntax that I should use to do so? My current code is: <tr> <td><% response.write rs.fields(1).Value%></td> </tr>
You could try:
<% response.write Server.HTMLEncode( rs.fields(1).Value ) %>
Thanks! Is there any list of ASP utilities like Server.HTMLEncode() on site that I can use?
Ah, what about %20 for space? Server.HTMLEncode doesn't do that ... To prevent deformed anchor links. Dijkgraaf
For URL's use Server.URLEncode()