ASP------字符串与HTML格式相互转换

代码:

1.字符串转HTML

HttpUtility.HtmlDecode(" is ")
或者
Server.UrlDecode(" is ")

2.HTML转字符串

HttpUtility.HtmlEncode(" is ")
或者
Server.UrlEncode("<p>is</p>")

 

posted @ 2017-06-21 22:08  玉天恒  阅读(1287)  评论(0编辑  收藏  举报