I want to make readOnly with EditorFor in edit page.
I tried to put readonly and disabled as:
@Html.Editor
Try using:
@Html.DisplayFor(model => model.userName) @Html.HiddenFor(model => model.userName)