如何将只读属性设置为Razor。
问题描述:
@if (Model.Amount!=null)
{
<tr>
<td>Amount</td>
<td>:</td>
<td>
@Html.EditorFor(model => model.Amount, new { @readonly = "true"})
@Html.ValidationMessageFor(model => model.Amount)
</td>
</tr>
}