MVC5 Html.BeginForm不会发布

时间:2016-10-18 17:46:43

标签: c# asp.net-mvc

帮助。我不知道如何解决这个问题。我只是寻找提交按钮转到控制器和操作方法,但我得到错误404 - 无法找到资源。

代码低于

我的cshtml:

@model TS_MVC.Models.LoginPage
@using (Html.BeginForm("ValidateUser", "Login", FormMethod.Post)) {
@Html.TextBoxFor(m => m.LoginForm.Email, new { @size = "40", @maxlength = "80" })
</ br>
@Html.PasswordFor(m => m.LoginForm.Password, new { @maxlength = "15" })
</ br>
<input type="submit" value="Login" />
}

我的LoginController.cs:

[HttpPost]
public ActionResult ValidateUser(LoginPage user) {
...
}

0 个答案:

没有答案
相关问题