Ich habe folgende in meiner asp.net MVC Web-Anwendung: -Wie macht man die @ Html.EditorFor Behinderte
<div><span class="f">Data Center Name</span> @Html.EditorFor(model => model.Switch.TMSRack.DataCenter.Name, new { disabled = "disabled" })</div>
aber das Feld wird nicht deaktiviert wird ,, kann jemand adivce bitte? THanks
Von MVC 5.1 ab '@ Html.EditorFor (model => model.Property, neu {htmlAttributes = new {@ disabled =" disabled "}})' –
Wenn Sie asp core verwenden, habe ich hier eine Lösung erklärt: https: // stackoverflow. com/a/44639822/6339469 – HamedH