Do not refresh parent view when closing partial view popup window

2 posts, 0 answers
  1. Anamika
    Anamika avatar
    124 posts
    Member since:
    Mar 2014

    Posted 09 Dec 2014 Link to this post

    Hello,

    I am displaying  popup window from parent displaying a  partial view. When the partial view loads my parent window URL is already changing to Controller/Action for partialview. When i submit the partial view i do not want to refresh the parents window. Submitting partial view should just Close Pop up  window. How can i achieve this. parent window method to Show popup window code is like this
    var direction = "ObjectDetail/Index";
    var wnd = $("#ObjectDetail").data("kendoWindow");
    if (wnd) {
    wnd.refresh({
    url: direction,
    data: { id: item.id }

    });
    wnd.element.css("visibility", "");
    wnd.center();
    wnd.open();
    }
    At this Point when child window Pops up parent window URL is changing to this new URL.

    The partial view has beginform
    @using (Html.BeginForm("SubmitFormCollection", "ObjectDetail"))
    {
    and on submit the actionresult i have to Redirect to parent URL again and this refreshes parent view
          [AcceptVerbs(HttpVerbs.Post)]
             public ActionResult SubmitFormCollection(ControlsContext selModel, FormCollection formCollection)
             {
       //do something
                  return RedirectToAction("Index", "ObjektActivity");         }

    How can i submit the popup window and Close it without refreshing parent.

    Anamika
  2. Anamika
    Anamika avatar
    124 posts
    Member since:
    Mar 2014

    Posted 09 Dec 2014 in reply to Anamika Link to this post

    please ignore this post, i could do a Ajax post in form submit and handle it.
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top