有没有办法在ReadOnly或Disabled中设置EditorFor
?
我尝试了许多不同的方法,但没有成功。
这是最后一个:
<div class="form-group">
@Html.LabelFor(Function(model) model.Operador, htmlAttributes:=New With {.class = "control-label col-md-3"})
<div class="col-md-9">
@Html.EditorFor(Function(model) model.Operador, New With {.disabled = "disabled", .readonly = "readonly", .htmlAttributes = New With {.class = "form-control"}})
@Html.ValidationMessageFor(Function(model) model.Operador, "", New With {.class = "text-danger"})
</div>
</div>