开发者

Razor Syntax / WebMatrix - C#

开发者 https://www.devze.com 2023-02-17 23:51 出处:网络
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'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" })

0

精彩评论

暂无评论...
验证码 换一张
取 消