1
我指的是this後, 但仍無法使其工作。誰能告訴我我錯在哪裏?我的代碼如下:如何將類添加到使用razor html幫助程序構建的表單中
@using (Html.BeginForm("Login", "Account",
FormMethod.Post, new { @class = "form" }))
{
@Html.ValidationSummary(true,
"Log in was unsuccessful. Please correct the errors and try again.")
<fieldset>
<legend>Log in Form</legend>
<ol>
<li>
@Html.LabelFor(m => m.UserName)
@Html.TextBoxFor(m => m.UserName)
</li>
<li>
@Html.LabelFor(m => m.Password)
@Html.PasswordFor(m => m.Password)
</li>
<li>
@Html.CheckBoxFor(m => m.RememberMe)
@Html.LabelFor(m => m.RememberMe, new { @class = "checkbox" })
</li>
</ol>
<input type="submit" value="Log in" />
</fieldset>
<p>
@Html.ActionLink("Register", "Register") if you don't have an account.
</p>
我想窗體類添加到這個form.Please幫助我..
你的'css'中定義了一個'form'類嗎?瀏覽器源代碼如何? – Kaf