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

12,323

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.

Share:
12,323
Nate Pet
Author by

Nate Pet

Updated on June 04, 2022

Comments

  • Nate Pet
    Nate Pet almost 2 years

    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?

  • gdoron is supporting Monica
    gdoron is supporting Monica almost 12 years
    @Html.Action will add the view when it was called, you can do what you're trying to do, or at least what it looks like you want to do.
  • dom
    dom almost 12 years
    From what I understand he is trying to include a child action within another action, but I could be wrong.