<td>@Html.EditorFor(Model => Model.Loan)</td>
我在视图的开头有那个,然后在那之后,我有一个类似的声明
The interest rate for the loan is @String.Format("{0:c}", Model.Interest).
它给了我错误“'Model'与声明'System.Web.Mvc.WebViewPage.Model'冲突”
我也试过
The interest rate for the loan is @String.Format("{0:c}", Model => Model.Interest).
它错误“无法将 lambda 表达式转换为类型'object []',因为它不是委托类型”
如果我删除 EditorFor,下一条语句不会出错。
除了将模型添加到 ViewBag 之外,有什么方法可以同时做到这两个方面。