当我运行我的应用程序,并单击并在下拉菜单中,出现这种情况:
我还有其他的谐音渲染和这种事情没有按不会发生。任何人都知道它为什么会发生?
局部视图
@model LetLord.Models.LoginModel
@(Html.BeginForm("Login", "Account", FormMethod.Post))
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
@Html.LabelFor(m => m.UserName)
@Html.TextBoxFor(m => m.UserName)
@Html.ValidationMessageFor(m => m.UserName)
@Html.LabelFor(m => m.Password)
@Html.PasswordFor(m => m.Password)
@Html.ValidationMessageFor(m => m.Password)
@*@Html.CheckBoxFor(m => m.RememberMe)
@Html.LabelFor(m => m.RememberMe, new { @class = "checkbox" })*@
@Html.ActionLink("Register", "Register", "Account", routeValues: null,
htmlAttributes: new { id = "registerLink" }) if you don't have an account.
}
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
2013-02-27
MattSull
+5
的错误是你的局部视图中。请张贴它。我猜你是缺少一个'@'某处... –
2013-02-27 20:18:04
+1
我没有@using(Html.BeginForm(...)) - 是我不好。 –
2013-02-27 20:23:25