In my mvc3 POST ActionResult method, I have a portion of code like this:
if (button == "Save as Pdf")
{
RedirectToAction("getPdf", "Pdf", resultObtained);
}
when the user clicked on the button, it redirect the user to getPdf action in PdfController while passing the object resultObtained as well to get the PDF file downloaded via browser but the RedirectToAction itself is not working.
Thanks.
Try this:
if (button == "Save as Pdf")
{
return RedirectToAction("getPdf", "Pdf", resultObtained);
}
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