Marek Marek - 1 month ago 6
C# Question

@Html adjusting size of icons

How to change size of the box in ASP.NET MVC?

@Html.TextBox("Name")


I know how to change in html but this is something new for me

Answer

You can use HTML attributes

@Html.TextBox("Name", new { @class = "class-name" })

and in your CSS file

.class-name {
    width: 50px;
}