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

linq 自动把我的"<"符号给转成"&lt;"了
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了。