如何在ASP.net MVC 4中从Controller调用HttpPost方法?

时间:2014-05-30 08:37:55

标签: asp.net-mvc post controller call

我无法从我的某个操作方法重定向到post方法。我的代码如下:

[HttpPost]
public ActionResult DepositForm(CASH_DEPOSIT cash_deposit)
{
    /*This line is not needed*/ ViewBag.ACCOUNT_ID = new SelectList(accountManager.GetAll(), "ID", "ACCOUNT_NUMBER");
    return RedirectToAction("ConfirmationPage",cash_deposit);
}

[HttpPost]
public ActionResult ConfirmationPage(CASH_DEPOSIT cash_deposit)
{
    return View(cash_deposit);
}

使用GetMethod将DepositForm方法重定向到ConfirmationPage。如何将DepositForm中的CASH_DEPOSIT类发布到ConfirmationPage?

0 个答案:

没有答案