Sunil
Sunil

Reputation: 127

ASP.NET MVC3 HTML Modification View

I am first time trying on ASP.NET MVC3 , defined the model (C#) and generated the controllers and views Views is using HTML Helpers . How to change the textbox , textarea length ( ie HTML attributes) .?

Upvotes: 0

Views: 58

Answers (1)

Illuminati
Illuminati

Reputation: 4619

You can specify htmlAtrributes (object) parameter in in the following manner to specify html attributes for the text box.

@Html.TextBoxFor(model => model.SomeProperty, new { @class = "someclass", width= "yourvalue" })

Upvotes: 1

Related Questions