Here is an example of what I'm trying to achieve:
@Html.EditorFor(m => m.Description, new { htmlAttributes = new { @class = "form-control", @readonly = Model.IsReadOnly, disabled = Model.IsDisabled } })
The problem is that the browser considers the readonly and disabled tokens without checking their contents, so when the IsReadOnly and IsDisabled false , it will still display as disabled .
Is there any simple solution for this?
html c # asp.net-mvc razor disabled-input
Shimmy Mar 25 '15 at 4:53 2015-03-25 04:53
source share