calling a function on the parent form from a popup window

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
 
N

Natty Gur

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
 
N

Natty Gur

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top