1
我得到:表達式樹不能包含一個動態操作ASP.NET MVC 3 - 一個表達式樹不能包含一個動態操作
當我這樣做:
@Html.TextBoxFor(m => m.Translations[ViewBag.Languages[i].CultureCode].Title)
<br/>
@Html.TextBoxFor(m => m.Translations[ViewBag.Languages[i].CultureCode].PreviewDescription)
<br/>
@Html.TextBoxFor(m => m.Translations[ViewBag.Languages[i].CultureCode].FullDescription)
我做的簡單TextBoxFor的早期,如:
@Html.TextBoxFor(m => m.ContactName)
@Html.TextBoxFor(m => m.EmailAddress)
在視圖的頂部,我使用語句類似於:@model x.y.z.Listing
這可能會更好地作爲評論,但它仍然是一個好點。 – WEFX