How can I use Server.Transfer with Pop Up Window?

  • Thread starter Thread starter Andreas Klemt
  • Start date Start date
A

Andreas Klemt

Hello,
is there a solution to use server.transfer like this:

Server.Transfer("javascript:void
window.open('webform2.aspx','testwindow','menubar=1,scrollbars=1,width=600,h
eight=400')")

I get an error message: Invalid path for child request 'javascript:void
window.open......


Thanks for any answer in advance!
Andreas
 
you can't.

Server.Transfer can only transfer to an asp.net page in the same
application. When you call Server.Transfer, it just creates an instance of
the specified page and transfers page processing from the current page to
the new page.

-- bruce (sqlwork.com)
 
You can't.
Window.Open is purely a client side function, while Server.Transfer is
purely a server side function (as the name implies.)
 
What you need is not to server.transfer but instead to send back to the
client a page that has a script that opens a window. For example:
<html><head><script> window.open (...) </script></head><body></body></html>

If you want to keep the launching window's contents in tact you will
obviously have to prepare the page as before just add the script to open the
window.

Regards,
Eran
 
Back
Top