複数のフォームを持つビューがあります
@using (Html.BeginForm("Withdrawal", "ATMControl", FormMethod.Post, new {}))
{
//code
}
@using (Html.BeginForm("Deposit", "ATMControl", FormMethod.Post, new {}))
{
//code
}
@using (Html.BeginForm("transfer", "ATMControl", FormMethod.Post, new {}))
{
//code
}
私のコントローラーで:
//this works
public ActionResult Index()
{
SetViewBagAccounts();
return View();
}
//this doesnt
[HttpPost]
public ActionResult Withdrawal(ATMModel model)
{
//do your login code here
return View();
}
私がやろうとしているのは、このコントローラーで個別に引き出し、入金、転送を処理することです。私はこのエラーが発生し続けます
リソースが見つかりません。
説明: HTTP 404。探しているリソース (またはその依存関係の 1 つ) は、削除されたか、名前が変更されたか、一時的に利用できない可能性があります。次の URL を見直して、スペルが正しいことを確認してください。
要求された URL: /ATMControl/Withdrawal