Here Mudassar Ahmed Khan has explained with an example, how to make TextBoxes created using Html.TextBox and Html.TextBoxFor helper functions ReadOnly i.e. not editable in ASP.Net MVC Razor.
The TextBoxes can be made ReadOnly by setting the HTML ReadOnly attribute using the HtmlAttributes parameter in Html.TextBox and Html.TextBoxFor helper functions.
↧