Html.LabelFor Specified Text

后端 未结 7 1570
渐次进展
渐次进展 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:10

    Easy solution just add the following in the view:

    @Html.LabelFor(c=>c.MyField, "My Field")
    

提交回复
热议问题