日期:2014-05-20  浏览次数:20757 次

奇葩问题求解决
   数据库中存储的数据是cell&microorganism ,然而网页上显示的却是cellμorganism,就是说不知道什么缘故"&micro"被"μ"这个符号给替换了,导致信息和数据库中的不相符,不知各位有没遇到过类似的问题,求解!
网页

------解决方案--------------------
被转义了
&micro 对应的html 字符是 μ

这里可以查,你查找下
------解决方案--------------------
应该是没有转义吧。试试吧&符号进行转义为html实体。
------解决方案--------------------
引用:
Quote: 引用:

被转义了
&micro 对应的html 字符是 μ

这里可以查,你查找下


那具体应该怎么操作捏
源代码
//information_classlb标签label
information_classlb.Text = ds1.Tables[0].Rows[0]["information_informationclass"].ToString();


information_classlb.Text = System.Web.HttpUtility.HtmlEncode(ds1.Tables[0].Rows[0]["information_informationclass"].ToString());