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();
ASP.NET C# 公共类中调用Server.HtmlEncode/Server.HtmlDecode
System.Web.HttpUtility.HtmlEncode()
System.Web.HttpUtility.HtmlDecode()
改用上述两个静态方法。
页面后台调用text = HttpContext.Current.Server.HtmlEncode(text).Trim();