I need redirect user depend of the result returned from Repository, nothing special. I do not have idea why this error happens. Here is the code:
[HttpPost]
public ActionResult Form(PaymentViewModel pvm)
{
string actionName = null;
actionName = pr.MakePayment(pvm) == true ? "Success" : "Failed";
return RedirectToAction(actionName, "Payment");
}
Create the action methods with the following names under controller "Payment" 1. Success 2. Failed Thats it.
Hope this helps!