(转) mvc 如何显示实体的displayname 属性的值

建文件~/Views/Shared/EditorTemplates/string.cshtml
输入
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, new { placeholder = ViewData.ModelMetadata.PropertyName})

使用
 @Html.EditorFor(m=>m.Name)
  
*****************************************************************************
签名档: http://feiyun0112.cnblogs.com/

posted @ 2019-08-15 17:42  凡的世界  阅读(613)  评论(0)    收藏  举报