Html.Label和Html.LabelForhelper方法不像大多数其他帮助程序那样支持htmlAttributes参数.我想设置一下class.像这样的东西:
Html.LabelFor(model => model.Name, new { @class = "control-label" })
Run Code Online (Sandbox Code Playgroud)
是否有一种简单的方法来扩展Label/LabelFor 而无需复制和扩展这些方法的ILSpy disasm输出?