Set disable attribute based on a condition for Html.TextBoxFor
The valid way is: disabled=”disabled” Browsers also might accept disabled=”” but I would recommend you the first approach. Now this being said I would recommend you writing a custom HTML helper in order to encapsulate this disabling functionality into a reusable piece of code: using System; using System.Linq.Expressions; using System.Web; using System.Web.Mvc; using System.Web.Mvc.Html; using … Read more