在我的 .cshtml 文件中,无论我在哪里使用 @Html.TextBoxFor,都会遇到错误
这是一个示例代码:
@model WebComposite.Models.CompositeModel
<label for="name">Name</label>
@Html.TextBoxFor(m => m.name)
错误:
Error #1:
'System.Web.Mvc.Html.InputExtensions.TextBoxFor<TModel,TProperty>(System.Web.Mvc.HtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel,TProperty>>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
Error #2:
One or more types required to compile a dynamic expression cannot be found. Are you missing a reference?
有任何想法吗?