views:

126

answers:

1

Hello friends,

I have two aspx pages i.e. default1.aspx and default2.aspx. Default1 contains some controls, tables etc. I am showing Default2.aspx into anthor window using hyperlink, setting its target to _blank. What I need is to call a button event which is placed inside Default1.aspx as soon as Default2 is closed (i.e. as soon as the new window showing default2 is closed).

Although, I know that this can be accomplished by showing the default2 into a modal popup i.e. show the default2 into a modal dialog and after that call the button event using javascript. But due to some reasons i am not permitted to do that.

Could some one please show me how i could do that.

+2  A: 

If I was you, I'd refactor what will the button in page 1 do in a helper method that both of pages can call.

Fabian Vilers
Thanks Fabiran! ok, is there any way to notify default1 that default2 is closed?
IrfanRaza
Hard to say. Don't forget that web programming is stateless. You should consider setting a flag somewhere to get the answer. IMHO, if you come to this kind of trick, it probably denotes a flaw in your design.
Fabian Vilers