ASP.NET MVC – LabelFor htmlAttributes Extension

Part of using any new framework such as ASP.NET MVC, is finding out what it can and cannot do. I was designing the layout for my application’s web forms and found out the LabelFor HTML helper didn’t allow one to pass html attributes like many of the other HTML helpers. Digging around on the web, I found this handy bit of code on Imran Baloch’s blog that neatly solved my problem. Continue reading “ASP.NET MVC – LabelFor htmlAttributes Extension”

Please follow and like us: