This is a migrated thread and some comments may be shown as answers.

Do not refresh parent view when closing partial view popup window

1 Answer 286 Views
Window
This is a migrated thread and some comments may be shown as answers.
Anamika
Top achievements
Rank 1
Anamika asked on 09 Dec 2014, 01:10 PM
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

1 Answer, 1 is accepted

Sort by
0
Anamika
Top achievements
Rank 1
answered on 09 Dec 2014, 02:01 PM
please ignore this post, i could do a Ajax post in form submit and handle it.
Tags
Window
Asked by
Anamika
Top achievements
Rank 1
Answers by
Anamika
Top achievements
Rank 1
Share this question
or