Reputation: 37
@Html.ListBoxFor(m => m.SelectedClients, new SelectList(Model.allClients, "ClientId", "Name"))
The above code refer to the Razor html helper for HTML List box.
How to set the size=20 in the above code?
Upvotes: 1
Views: 25
Reputation:
You need to use the overload that accepts htmlAttributes
@Html.ListBoxFor(m => m.SelectedClients, new SelectList(....), new { size = "20" })
Upvotes: 1