Why can't I pass in html attributes to EditorFor()? eg;
<%= Html.EditorFor(model => model.Control.PeriodType,
new { disabled = "disabled", readonly = "readonly" }) %>
I don't want to use metadata
Update: The solution was to call this from the view :
<%=Html.EditorFor( model => model.Control.PeriodEndDate, new {Modifiable=model.Control.PeriodEndDateModifiable})%>
and use ViewData["PeriodEndDateModifiable"]
in my custom EditorTemplates/String.ascx where I have some view logic that determines whether to add readonly and/or disabled attributes to the input