鉴于这种HTML代码:“[”不从@ Html.DisplayText(“[”)表明,网页不反映这个网站码
@Html.TextBoxFor(x => x.CountryName, new { placeholder = "Country", @class = "input-medium", customerui = "Country" })
@Html.DisplayText(" [ ")
@Html.DisplayTextFor(x => x.CountryName)
@Html.DisplayText(" ] ")
@Html.DisplayTextFor(x => x.CountryFootnote)
的期望是,以下是所示:
- 输入文本框[VC]圣文森特和格林纳丁斯
但相反,“[”和“]”缺失?
也许你需要使用字符代码。 '''''''['''''']''。尽管没有使用剃刀。 – Turnip 2014-10-08 12:07:24
请参阅此处的答案:http://stackoverflow.com/questions/14387396/html-displaytext-will-not-actually-display-text – 2014-10-08 12:09:47
您的问题的答案是链接中的第二个由@AndrewKarpov发布 – melancia 2014-10-08 12:18:25