Html.LabelFor Specified Text

后端 未结 7 1585
渐次进展
渐次进展 2020-12-24 04:28

Anyone got any idea on how to specify text when using Html.LabelFor(c=>c.MyField). It\'s just MyField might not be an appropriate name to displ

7条回答
  •  不知归路
    2020-12-24 05:03

    I haven't downloaded v2 yet, so I can't test, but I believe it works like DynamicData, in which case you'd do something like this on your model:

    [Display(Name = "The Super Fantastic Field")]
    public string MyField {get;set;}
    

提交回复
热议问题