Click here to Skip to main content
13,145,068 members (57,022 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hello Professionals,

I have One Issue something like this
I have Commmon Search Page Search.aspx, that have dropdown and gridviw that are bound dynamically.
I have Other pages like doctor.aspx,reference.aspx
From that pages i have called search.aspx in model pop-up iframe.
i am passing parameters by session from every page to bind dropdown and gridview.
and searchpage.aspx is searching well
Problem is that gridview has view link button and in it's Row Command event i want to close the model popup and reload the previous page cause on Row command i want to fill textboxes of previous page(like doctor.aspx).

i have tried with javascript window.close(); but unsuccessful...
any help???
suggestions are also welcomed....
Posted 21-Mar-13 19:59pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You cannot just write window.close(). This is an instance function; you need to call it with some window instance you created before.

Please see my past answer and the code sample: Close one page when parent page is closed[^].

Are you getting the idea?

Devang Vaja 22-Mar-13 2:14am
see my gridview is in searchPage.aspx is in iframe src which is in modelpopup i want to close model pop up and reload the "opener page".... on row_Command
Is you pop up a browser window, or something else? You were asking about using window.close()...
Devang Vaja 22-Mar-13 2:49am
in doctor.aspx i have button search on search_click event i have done;
in model pop up i have put i frame and in i frame i have given src of search.aspx which has gridview and its row_command

now on gridview_rowcommand i want to close the model popup...
How about exact reference to modelpopup object documentation. In all cases, it should be an instance function, like myPopup.close(), myPopup.hide(). You need to use a variable referencing your previously created object. If this is based on some available HTML element (a typical situation), there is no close, you should hide it; it usually has hide() function.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170915.1 | Last Updated 22 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100