Use HTML Attributes for TextBox in ASP.NET: Pictorial Representation

Hi Friends ,
 
This is the way to generate TextBox with certain properties.
  1. @Html.TextBoxFor(model => model.properyName, new { @maxlength="25",disabled = "disabled",@class = "form-control" })  
 

This will generate a textbox that matches your property name and will also populate the textbox with any values that are contained within the Model.

To know more MVC and WebApi Kindly go through with these links

MVC Articles & WCF and WebApi

Thanks.

Enjoy coding and reading.
Ebook Download
View all
Learn
View all