提示缺少结束符或缺少‘}’

如果提示缺少结束符,可以试着把字符串中德回车给去掉。

如果其实缺少‘}’,可以用"替代‘

string content = string.Format(@"<img style=&quot;float:top;margin:4px&quot; id=&quot;imgDevice&quot; src=&quot;wheelbucket1.jpg&quot; width=&quot;400&quot; height=&quot;150&quot; title=&quot;DeviceImg&quot;/><br/><b>设备类型:</b>{0} &nbsp <b>设备编号:</b>{1}<br/><b>设备位置:</b>{2}<br/><b>工作状态:</b>{3} &nbsp <b>健康状态:</b>{4}<br/><hr color=&quot;#987cb9&quot;/><a style=&quot;text-decoration:underline;color:#2679BA;&quot; href=&quot;#&quot;>设备信息</a>>> &nbsp<a style=&quot;text-decoration:underline;color:#2679BA;&quot; href=&quot;#&quot;>主要监控参数</a>>> &nbsp<a style=&quot;text-decoration:underline;color:#2679BA;&quot; href=&quot;#&quot;>具体设备监控界面</a>>> &nbsp",eqpType, eqpNum, eqpLoc, eqpWorkState, eqpHealthState);

原文地址:https://www.cnblogs.com/lsr-flying/p/4507717.html