读书人

linq 自动把小弟我的quot;lt;quot;符号给转成quot;lt;quot;

发布时间: 2012-01-08 22:48:50 作者: rapoo

linq 自动把我的"<"符号给转成"<"了
select new
{
UserId = u.UserId,
jobid = u.jobid,
department = u.department,
job = u.job,
click = u.click,
updatedate = u.updatedate,
sate = bsate(u.sate.ToString())


};
public string bsate(string s)
{
switch (s)
{
case "1":
return "<font color=#808080>正常</font>";
case "0":
return "<font color=#808080>屏蔽</font>";
default:
return "<font color=#003399>正常</font>";
}
}
linq 自动把我的"<"符号给转成"& l t ;"了

这种情况怎么办?

[解决办法]
这个和linq有什么关系。

一定是你哪里使用htmlencode了。

读书人网 >.NET

热点推荐