Currently i have this field on a form:
@Html.EditorFor(model => model.AmountDecimal,
new { htmlAttributes = new { @class = "form-control" } })
But:
a) i want it to have the value "100" predefined
b) don't want it to be editable
I know how to do it in raw HTML but i need it to be in razor.
Thanks
Model'sAmountDecimal, you can change it there. Thedisabledattribute you can add to the same anonymous object that already contains theclass.