HTML编码

string str = "%3D1%26"; string newstr = Server.UrlDecode(str); Response.Write(newstr);
输出结果为: =1&
不过你这应该是Url编码的,如果是HTML编码的应该用Server.HtmlEncode();
用 HttpUtility.HtmlDecode()也是可以的,不过我习惯用Server类

posted @ 2016-03-09 15:07  yangan  阅读(132)  评论(0)    收藏  举报