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
高興它幫助你:) –