C# 公共类中调用Server.HtmlEncode/Server.HtmlDecode

ASP.NET C# 公共类中调用Server.HtmlEncode/Server.HtmlDecode

System.Web.HttpUtility.HtmlEncode()

System.Web.HttpUtility.HtmlDecode()

改用上述两个静态方法。

页面后台调用text = HttpContext.Current.Server.HtmlEncode(text).Trim();

posted @ 2015-08-21 14:43  花影疏帘  阅读(768)  评论(0)    收藏  举报