Encoding URL strings

posted by Scudyen date: Thursday, May 22, 2008 category: ASP

While passing variables as an URL's querystring, you should need to encode the string. All special characters like space must be written in adress bar in a form for browser.

Without encoding Example :


<a href="search.asp?query=all news in 2006">List all news in 2006</a>


If you try this link, there would be some missing queries in your SQL command. But if prefer to use URL Encode function, all querystring will be encoded in a safe mode.

Encode Example :

<a href="search.asp?query=<%Server.URLEncode("all news in 2006")%>">List all news in 2006</a>

Read More

Custom Search



Gazatem Technologies Active News Manager


page counter

Listed with 411asp.net Listed with 4aspin.com