I have an ActionResult that accepts POST, however is there a work around for me to redirect from a controller to another controller containing this POST method/action???
Here is signature of the method I am redirecting to;
[ValidateAntiForgeryToken]
[Transaction]
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(Payment payment, PaymentApplication paymentApplication, string exchangeId, bool manual, int firstPaymentId, int? exchangeEventId, bool addOnly)
{
}
You cannot use RedirectToAction to call a POST method. For your specific need, just new the controller and call the method directly from the other controller, passing whatever the parameters.
var controller = new YourControllerWithMethodToCall();
controller.Edit(payment, etc...);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With