【发布时间】:2014-09-07 06:04:26
【问题描述】:
我的模特是
public class RegisterViewModel
{
[Required]
[Display(Name = "User name222")]
public string UserName { get; set; }
}
我的看法是
@Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
显示的是“UserName”,而不是“User name222”。
并且ErrorMessage显示“用户名222字段为必填项。”
=============================================== 所有代码都是VS14 CTP2 Asp.net Vnext Web Application自动生成。
为什么?如何解决?
【问题讨论】:
标签: c# asp.net .net asp.net-mvc asp.net-core