Mvc DataAnnotations how to make a field editable in 3.5

I have several fields in my entity that I want to be unavailable for editing. Looking at the docs, it looks like the "EditableAttribute" will do the trick. However it is only 4.0

Just wondering if there are other attributes that will have the effect of desire. So be clear

I have a field called "DateRegistered". I want to show this as a string, not a text field, using "Html.EditorFor"

0
source share
2 answers

The [ReadOnly] attribute should work in 3.5.

+1
source

-, ? <%= Html.DisplayFor(x => x.DateRegistered) %> .

+1

All Articles