How can I override the @Html.LabelFor template?

前端 未结 3 762
小蘑菇
小蘑菇 2020-11-27 13:37

I have a simple field form

@Html.LabelFor(model => model.Register.UserName) @Html.TextBoxFor(model => mo
3条回答
  •  隐瞒了意图╮
    2020-11-27 13:44

    LabelFor is an extension method (static) and therefore cannot be overridden. You'd need to create your own Html Helper Extension method to achieve what you require.

提交回复
热议问题