Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How RedirectToAction which returna partial view can return a full view?

I am doing a redirect to an action which in turn displays the content within a PartialView

return PartialView(data);

I do the Redirect as such:

return RedirectToAction("SpkAction",  new { id = ID});

The redirect works fine and I do get to the SpkAction corrrectly. But when the PartialView is rendered it ONLY shows the PartialView and not the whole form.

How do I get the PartialView to show the whole form and not just the PartialView using a RedirectToAction that goes to an action that which returns a PartialView?

like image 959
Nate Pet Avatar asked Feb 20 '23 02:02

Nate Pet


1 Answers

How do I get the PartialView to show the whole form and not just the PartialView using a RedirectToAction that goes to an action that which returns a PartialView?

You can't.

If you redirect to an action returning a PartialView how in the name of do you expect it to return a full view?

Redirect to an action returning a View.

like image 165
gdoron is supporting Monica Avatar answered May 01 '23 18:05

gdoron is supporting Monica