Razor Syntax / WebMatrix - C#
I'm just starting out with WebMatrix and would like to know how to style a @Html.TextBox("email")
and @Html.Password("password")
control?
I've tried (in my CSS file):
.email{
/* styles here */
}
.password{
/* styles here */
}
But that has no effect at all. How can we style these types 开发者_开发技巧of controls?
You can indicate what class to use when creating the text box with an anonymous type like so: @Html.TextBox("Email", null, new { @class="email" })
精彩评论