tag Would you make an HTML Helper for a text box that has other attributes?new class "text-box single-line readonly", readonly "readonly", disabled "disabled" ) else Html. TextBox("", ViewData.TemplateInfo.FormattedModelValue How to create a readonly textbox in ASP.NET MVC3, With Razor view engine ? Is there an HTMLHelper method available to do that ?I am having a view page in mvc 4 with following lines < td > Html.LabelFor My Application is in Asp.Net MVC3.I have many TextBoxes in my View.And there are few readonly Textboxes in it.I want that the readonly textboxes should be displayed with a different Background color.TextBox which has the value of the Date selected using the jQuery DatePicker in ASP.Net MVCAction method for handling GET operation. Inside this Action method, simply the View is returned.The TextBox has been made ReadOnly and has been applied with the jQuery DatePicker Plugin. mvc textbox readonly More translation. MVC Introduction MVC application MVC folder MVC layout MVC Controller MVC view MVC database MVC model MVC Safety MVC HTML Helper MVC release MVC Reference Manual.ReadOnly attribute is used to set or return Can I change the text in the TextBox control. Answered by: The WPF Textbox control hasnt ReadOnly Property?how to set Textbox realonly? I would not to set the enable Property to false. Thx for any helps. My Application is in Asp.Net MVC3.I have many TextBoxes in my View.And there are few readonly Textboxes in it.I want that the readonly textboxes should be displayed with a different Background color. Fill the String.cshtml with this code: if(ViewData.ModelMetadata.IsReadOnly) Html. TextBoxcleftheris well we are in version 5 now, and MVC still didnt take them ) In model class, put the [ReadOnly(true)] attribute on properties which you want to be readonly. How to create a readonly textbox in ASP.NET MVC3, With Razor view engine ? Is there an HTMLHelper method available to do that ? Something like this ? With help of HTML Helpers we can reduce the amount of typing of HTML tags for creating a HTML page. For example we use Html. TextBox() helper method it generates html input textbox.