yes you are getting it write.i am using popup window to show some images in gridview if click on view button than you can see larger image on next page (page2) .
When you close your child window i.e. Page2.aspx write
window.opener.location.reload(), This will reload the parent window i.e. Page1.aspx. In Page1.aspx you should save the value in some state variable to know whether the modal popup is already opened or not. On page load you should check that.
vineeta_2010
Member
149 Points
151 Posts
how to open previous page when I close current page
Jun 21, 2012 11:14 AM|LINK
I am opening a page ("page2") by response redirect from modal popun extender on page1,
now I want to open previous page(page1) along with modal popup extender, when I close this page (page2).
how can I do this.I am using c# asp.net 2008.
I made an image uploader in modal popup.page2 shows image in a big form.
karang
Contributor
2439 Points
918 Posts
Re: how to open previous page when I close current page
Jun 21, 2012 11:35 AM|LINK
Hi
When you are redirecting from page2 to page1 write like that
Reponse.Redirect("Page1.aspx?IsOpenModalPopUp=true");
on page load of Page1 write following code
if(Request.QueryString("IsOpenModalPopUp") != null)
{
if(Convert.ToBool(Request.QueryString("IsOpenModalPopUp") ) == true)
{
<modal_pop_up_id>.show();
}
}
Karan Gupta
http://gyansangrah.com
Please click "Mark as Answer" if this helped you.
vineeta_2010
Member
149 Points
151 Posts
Re: how to open previous page when I close current page
Jun 21, 2012 12:50 PM|LINK
hi thanx for replying I am not redirecting from page1, i close page2,after closing page2 I want that I should return on previous page.
I am not using any button for closing it . I close it by clicking browser button
karang
Contributor
2439 Points
918 Posts
Re: how to open previous page when I close current page
Jun 22, 2012 05:15 AM|LINK
Hi
Are you using popup window for Page2.aspx
Karan Gupta
http://gyansangrah.com
Please click "Mark as Answer" if this helped you.
vineeta_2010
Member
149 Points
151 Posts
Re: how to open previous page when I close current page
Jun 22, 2012 09:48 AM|LINK
yes you are getting it write.i am using popup window to show some images in gridview if click on view button than you can see larger image on next page (page2) .
karang
Contributor
2439 Points
918 Posts
Re: how to open previous page when I close current page
Jun 22, 2012 10:09 AM|LINK
Check this link
http://www.sitepoint.com/forums/showthread.php?212551-how-to-pass-parameter-from-a-child-window-back-to-the-main-window
When you close your child window i.e. Page2.aspx write
window.opener.location.reload(), This will reload the parent window i.e. Page1.aspx. In Page1.aspx you should save the value in some state variable to know whether the modal popup is already opened or not. On page load you should check that.
This is the only method I found :)
Karan Gupta
http://gyansangrah.com
Please click "Mark as Answer" if this helped you.
karang
Contributor
2439 Points
918 Posts
Re: how to open previous page when I close current page
Jun 22, 2012 11:00 AM|LINK
Hi
Is your issue fixed?
Karan Gupta
http://gyansangrah.com
Please click "Mark as Answer" if this helped you.
vineeta_2010
Member
149 Points
151 Posts
Re: how to open previous page when I close current page
Jun 23, 2012 08:14 AM|LINK
not yet I didnt try this solution yet,actually I am bit busy will reply you soon ,but thanx for replying..:),I really apreciate.