之前调试还好好的,后来数据表加了几个字段就报这个错误,不过后来终于解决了,原因是增加的某个字段值为null,导致MVC的View识别不了,源代码<%=m.Description.Replace("$", "<br/>")%> 

改成如下就可以了

<%=(string.IsNullOrEmpty(m.Description)) ? string.Empty : m.Description.Replace("$", "<br/>") %>

 

 

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-19
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
  • 2021-09-05
  • 2022-12-23
相关资源
相似解决方案