Author: Aamir Hasan
UrlEncode it is the process of converting string into valid URL format as specification of w3.org
string URLEncode = Server.UrlEncode("aamirhasan.aspx?Name = aamirhasan&ID = 23");
Response.Write("Encoding URL:-" + URLEncode);
//show like this aamirhasan.aspx%3f+Name+%3d+aamirhasan%26ID+%3d+23
UrlDecode:- URL-decodes a string and returns the decoded string.
string URLDecode = Server.UrlDecode(URLEncode);
Response.Write("Decoding URL:-" + URLDecode);
//show like this aamirhasan.aspx?Name = aamirhasan&ID = 23
Online Encode and Decode :http://www.opinionatedgeek.com/DotNet/Tools/HTMLEncode/Encode.aspx
References:
http://msdn.microsoft.com/en-us/library/zttxte6w.aspx
http://msdn.microsoft.com/en-us/library/6196h3wt.aspx
Author:
Aamir Hasan औथोर:
आमिर हसन أثر
أمير حسن .
d2459779-0bc0-4ca6-846a-050451714ee4|0|.0
ALL, asp.net
asp.net, encode & decode