ReadOnly Attribute in MVC 4

Viewed 27474

While the toot-tip says,

enter image description here

I tried using it but could not make it to work. I am not sure how it works and about its functionality. So what purpose does this built-in attribute ReadOnlyserve?

Any inputs will be appreciated. Thank you.

2 Answers
@Html.EditorFor(
  model => model.id_to_fetch,
  new {
    htmlAttributes = new {
      @class = "form-control" , @readonly = "readonly"
    }
  }
)
Related