I want to make readOnly with EditorFor in edit page.
I tried to put readonly and disabled as:
<div class="editor-field">
@Html.EditorFor(model => model.userName, new { disabled = "disabled", @readonly = "readonly" })
</div>
However, it does not work. How can I make to disable edit this field?
Thank you.
See Question&Answers more detail:os