帮助!为什么我的程序的控制器仍在工作,即使我已经删除了所有的控制器方法。我不知道发生了什么,这就像程序变得不朽。
对不起,我还是MVC的新手。
这是我的控制器示例
[HttpPost]
public ActionResult Login(login a)
{
try
{
using (var c = new Entity.DatabaseEntities())
{
var b = c.accounts.FirstOrDefault(v => v.ID == a.cID && v.password == a.cpassword);
if (b == null)
{
return View();
}
else
{
return RedirectToAction("Index");
}
}
}
catch
{
return View();
}
}
这是我视图中的登录表单:
@using (Html.BeginForm("Login", "Home", FormMethod.Post))
{
@Html.TextBoxFor(m => m.cID)
@Html.ValidationMessageFor(m => m.cID)
@Html.PasswordFor(e => e.cpassword)
@Html.ValidationMessageFor(e => e.cpassword)
<p ><input type="submit" value="Login"/></p>
}
我删除了登录控制器,当我尝试登录时,程序仍在运行