James Flower

C# .NET and Web Developer

Tag: htmlhelper

There is 1 post with the "htmlhelper" tag.

Disabling an ASP.NET MVC input control

Posted on
2 min read

I love ASP.NET MVC. It is a great framework to get web apps quickly built. However using the built in HtmlHelper methods on your views isn’t without its issues. An example of this is when trying to disable a HTML input control which has been built using HtmlHelper. You can add the “disabled” attribute which would be required by making use of one of the helper’s overloads however if you want to conditionally disable a control (based on your view model) it can result in your view’s code be

Read more...