的HtmlHelper NameFor方法 [英] HtmlHelper NameFor method
本文介绍了的HtmlHelper NameFor方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有已经实施的 Html.NameFor
特点,即获得名称
HTML的模型项目属性?
I'l喜欢用下面的code在我的Razor视图:
<输入类型=文本VALUE =@ Model.User.EmailNAME =@ Html.NameFor(X => x.User.Email)&GT ;
解决方案
对了,还有的 Html.NameFor
在ASP.NET MVC期货的装配方法。
Is there any Html.NameFor
feature already implemented, that get the name
html attribute for a model item?
I'l like to use the following code in my Razor view:
<input type="text" value="@Model.User.Email" name="@Html.NameFor(x => x.User.Email)">
解决方案
Yes, there is Html.NameFor
method in the ASP.NET MVC Futures assembly.
这篇关于的HtmlHelper NameFor方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文