Hi,
I have an mvc application.
Parent page index.cshtml
Child page create.cshtml
On parent page i have a grid with one column as input button where i use show modal dialog.
I have a requirement when closing the browser button of this show modal dialog parent page should not refresh.
Only parent page should refresh when i click submit button of child window.
Please give me some idea how can i do this.
Index.cshtml inside grid i have this button.
Using window.location.reload it is refreshing parent page also when i click on child window browser button.
Please help!!
Loading

Iftikar HussainRank #423 · 5.9K reputationPosted Jul 17, 2013, 12:44 AM EDT
Try like this
in your index.cshtml
" />
create one javascript method (you can pass all parameter)
in your create.cshtml
Regards,
Iftikar
Deepika Chaudhary133 reputationPosted Jul 17, 2013, 2:14 AM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 17, 2013, 2:36 AM EDT
//your code
Regards,
Iftikar
Deepika Chaudhary133 reputationPosted Jul 17, 2013, 3:23 AM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 17, 2013, 3:55 AM EDT
return JavaScript("window.close();window.opener.document.location.reload();");
Regards,
Iftikar
Anjali KhanRank #1,649 · 931 reputationPosted Mar 21, 2017, 9:32 PM EDT
hi
this is my action
public ActionResult Comment(int id)
{
FileViewModel cm = new FileViewModel();
cm.user_ID = id;
return View(cm);
}
Jitendra ShekhawatRank #1,909 · 772 reputationPosted Mar 21, 2017, 10:34 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts