How I can pass a query string with special characters?
For example I need to pass "&" inside my query string as below:
../solrresults.asp?mode=search&data=M & S
Use Server.UrlEncode:
Server.UrlEncode
URLEncode converts characters as follows: Spaces ( ) are converted to plus signs (+). Non-alphanumeric characters are escaped to their hexadecimal representation.
Use it this way;
<a href="page2.asp?name=<%= Server.URLEncode(sName) %>">here</a>
2.1m questions
2.1m answers
60 comments
57.0k users