我有這樣的代碼:如何申請上邊距我Html.BeginForm
<div class="mdl_bdy_frm">
@using (Html.BeginForm())
{
@Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.")
@Html.LabelFor(m => m.Login.UserName, new { @class = "adm" })
@Html.TextBoxFor(m => m.Login.UserName, new { @class = "adm", size = 30 })
@Html.ValidationMessageFor(m => m.Login.UserName)
@Html.LabelFor(m => m.Login.Password, new { @class = "adm" })
@Html.PasswordFor(m => m.Login.Password, new { @class = "adm", size = 30 })
@Html.ValidationMessageFor(m => m.Login.Password)
<br />
@Html.CheckBoxFor(m => m.Login.RememberMe, new { @class = "adm" })
@Html.LabelFor(m => m.Login.RememberMe, new { @class = "adm" })
<p><input type="submit" value="Login" /></p>
}
</div>
有沒有辦法,我可以在上面利潤率風格給我HTML.BeginForm的方法嗎?如果可能的話,我想用一種內聯風格來做到這一點,就像在一個地方使用它一樣。
它拋出錯誤在MVC 5堅實的邊界。 – VincentZHANG