您的位置:首页 > Web前端 > HTML

Html.TextBoxFor 提示出错解决办法

2012-12-20 12:14 671 查看
在.cshtml面面中

@Html.TextBoxFor(model => model.Name)

上面语句提示如下错误, 并且model属性不能智能提示

The type arguments for method '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.


解法办法

在web.config上添加

<compilation debug="true" targetFramework="4.0"/>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐