When I annotate my ViewModel with:
[Editable(false)]
public string Name { get; set; }
Then I create a new View in Visual Studio and I get a View with an editable TextBox:
<div class="editor-label">
@Html.LabelFor(model => model.Name)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Name)
@Html.ValidationMessageFor(model => model.Name)
</div>
Why is that?
http://forums.asp.net/t/1656755.aspx/1
This post talks about how that attribute only sets the IsReadOnly Property of the ModelMetaData. He says that you could create an EditorFor Template that would read that property and set the field to disabled, but it seems to me that this isn’t the intended function of the attribute.