Explain Server.URLEncode Method.

 Posted by Bhakti on 11/17/2009 | Category: ASP.NET Interview questions | Views: 3748
Answer:

This method applies URL encoding rules, including escape characters. Where Spaces are converted to plus signs and non-alphanumeric characters are converted to their hexadecimal codes.

For an example,
Response.Write(Server.UrlEncode("http://testurl encode 123.com"));


Will result,
http%3a%2f%2ftesturl+encode+123.com


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response