2
它应该是很容易的,但不能看到它... 我有以下几点:转换为小写在Html.DisplayNameFor
@Html.EditorFor(model => model.FullName, new
{
htmlAttributes = new
{
@class = "form-control",
placeholder = "Please type your " + Html.DisplayNameFor(model => model.FullName),
data_bind = "value: product.fullname"
}
})
当我键入Html.DisplayNameFor(model => model.FullName.ToLower())
我得到一个异常
类型的异常“System.InvalidOperationException”发生在 System.Web.Mvc.dll程序但在用户代码中没有处理
其他信息:模板可以仅用于字段访问, 属性访问,单维数组索引或单参数 自定义索引器表达式。
我该如何操作我的字符串Html.DisplayNameFor
?
辉煌,感谢 – Nostradamus
高兴它帮助你:) –