Is it possible to set a css class in a TextBox html helper? This doesn't compile, obviously:
<%=Html.TextBox("Region",Model.Region,new {class="Autocomplete"}) %>
Thanks.
Class
is a reserved keyword, so you need to write it like this:
<%=Html.TextBox("Region", Model.Region, new { @class="Autocomplete" }) %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With