乱码转换
2014-06-17 11:35 ゞ蓦然灬淺笑ゞ 阅读(237) 评论(0) 收藏 举报<1、从数据读出显示到页面上>
例:string Content =
“"&lt;p style=&quot;TEXT-ALIGN:center;&quot;&gt;&lt;span style=&quot;font-family:宋体;&quot;&gt;&lt;今天星期三/p&gt;&lt;p style=&quot;TEXT-ALIGN:center;”
Content = Content.Replace("&", "&");
Content = System.Web.HttpUtility.HtmlDecode(Content);
<2、从页面上保存到数据库中---进行反转>
Content = System.Web.HttpUtility.HtmlDecode(Content);
Content = Content.Replace("&", "&");
浙公网安备 33010602011771号