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

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
 
B

bruce barker

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)
 
S

Steve C. Orr [MVP, MCSD]

You can't.
Window.Open is purely a client side function, while Server.Transfer is
purely a server side function (as the name implies.)
 
E

Eran Amitai

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
 

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

Top