我有一个模型类,其属性如下:
[Display(Name = "Phone", Description="Hello World!")]
public string Phone1 { get; set; }
在我的视图中显示标签和呈现输入文本框非常简单:
@Html.LabelFor(model => model.Organization.Phone1)
@Html.EditorFor(model => model.Organization.Phone1)
@Html.ValidationMessageFor(model => model.Organization.Phone1)
但是如何呈现 Description 注释属性的值,即“ Hello World!”?