call today Call Today 320.281.0605

Add css class attribute to html helpers in asp.NET MVC 2

August 26, 2010    Author: Joel

It took me forever to find out how to do this so hoping this will save someone else the time.

Here is an example:

<%= Html.TextBoxFor(model => model.Email, new { @class = "txtLarge" })%>

In asp.NET MVC I used _class it seems in MVC 2 you need to use the @ symbol.

Share
Agent Cody Banks 2 Destination London full lenght movie download Afghan Knights download movie Inside the Smiths download movie Beverly Hills Chihuahua download movie Permanent Vacation download movie Indiana Jones and the Kingdom of the Crystal Skull download movie Afghan Knights download movie Inside the Smiths download movie Beverly Hills Chihuahua download movie Permanent Vacation download movie Indiana Jones and the Kingdom of the Crystal Skull download movie