MVC3 EditorFür ReadOnly
Ich möchte readOnly mit EditorFor auf der Bearbeitungsseite erstellen.
Ich habe versucht, readonly und disabled als:
<code><div class="editor-field"> @Html.EditorFor(model => model.userName, new { disabled = "disabled", @readonly = "readonly" }) </div> </code>
Es funktioniert jedoch nicht. Wie kann ich die Bearbeitung dieses Feldes deaktivieren?
Vielen Dank.