是否有一个Html.NameFor功能,它获取name模型项的html属性?
Html.NameFor
name
我想在我的Razor视图中使用以下代码:
<input type="text" value="@Model.User.Email" name="@Html.NameFor(x => x.User.Email)">
asp.net-mvc html-helper razor
asp.net-mvc ×1
html-helper ×1
razor ×1