calling a function on the parent form from a popup window

  • Thread starter Thread starter Michelle Stone
  • Start date Start date
M

Michelle Stone

I have an asp.net form, which calls a popup window.

The popup window, based on some user input should call a
function on the parent window.

Is this possible?

I have tried creating a javascript function in the .aspx
file and used the following to call the javascript
function from the popup window

Response.Write ("<script
language=javascript>window.opener.doRefresh ();
</script>");

But I want to call not a javascript function in the .aspx
file, but a c# function in the aspx.cs file. How do I do
this?

Thanks
 
Hi,

As far as I know it's impossible to call parent page client script from
server side of popup window. Your client side script approach is
probably the best way. Anyway consider to use RegisterClientScriptBlock
instead of Response.write().


Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 
Hi,

As far as I know it's impossible to call parent page client script from
server side of popup window. Your client side script approach is
probably the best way. Anyway consider to use RegisterClientScriptBlock
instead of Response.write().


Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 
Back
Top