andrey.shedko andrey.shedko - 1 month ago 7
C# Question

Resource cannot be found on RedirectToAction

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:

public ActionResult Form(PaymentViewModel pvm)
string actionName = null;
actionName = pr.MakePayment(pvm) == true ? "Success" : "Failed";
return RedirectToAction(actionName, "Payment");

Answer Source

Create the action methods with the following names under controller "Payment" 1. Success 2. Failed Thats it.

Hope this helps!