Html.TextBoxFor and the class html attribute

Html.TextBoxFor with Custom Attributes

Html.TextBoxFor with Multiple Custom Attributes

Html.TextBoxFor with Class Attributes

Add class attribute to a textbox in MVC Html.TextBoxFor

Html.textboxfor class attribute

Solution

@(Html.TextBoxFor(model => model.Firstname, new { style = “width:230px;height: 18px;”, @class = “txt” }))

 

About the Author

avatar