代码:
1.字符串转HTML
HttpUtility.HtmlDecode(" is ") 或者 Server.UrlDecode(" is ")
2.HTML转字符串
HttpUtility.HtmlEncode(" is ") 或者 Server.UrlEncode("<p>is</p>")
时间: 2024-10-20 18:17:13
代码:
1.字符串转HTML
HttpUtility.HtmlDecode(" is ") 或者 Server.UrlDecode(" is ")
2.HTML转字符串
HttpUtility.HtmlEncode(" is ") 或者 Server.UrlEncode("<p>is</p>")