asp.net 编码 解码

     

编码代码:

System.Web.HttpUtility.HtmlEncode("<a href=\"http://hovertree.com/\">何问起</a>");

解码代码:

System.Web.HttpUtility.HtmlDecode("&lt;a href=&quot;http://hovertree.com/&quot;&gt;&#20309;&#38382;&#36215;&lt;/a&gt; "); 

 

Server.UrlEncode("");
Server.UrlDecode("");
System.Web.HttpUtility.UrlEncode("");
System.Web.HttpUtility.UrlDecode("");
System.Uri.EscapeDataString("");
System.Uri.UnescapeDataString("");

 

posted @ 2017-06-26 15:30  xiaoshi657  阅读(222)  评论(0编辑  收藏  举报