I'm trying to prevent user from using input in some condition but for disabling it if I add disabled to it, it will disable no matter that its value is true or false.
This is my code:
@Html.TextBoxFor(model => model.inputName, new { @disabled = (condition ? "true" : "false") })
In any condition it will be disabled.