I want to Enable or Disable a textbox based on the value (Model.CompanyNameEnabled).
The below code is not working. Please rectify.
@{
As is already mentioned in this thread the suggested answer doesn't work in MVC5 anymore. There's actually an easy two step solution to that problem.
@Html.TextBox("CompanyName", "", new { htmlAttributes = new { @class = "form-control switch-disable" } })