Skip to main content

how to set the width or styles to textboxfor in asp.net mvc?

Use the following code to set width or any html attributes like style, class, etc. to Html.TextBoxFor html helper.


@Html.TextBoxFor(m => m.Email, new { Class = "mystyle" }) 

Comments