in ASP .NET ( How can i open a new window ligaly ( not a popup ) andin the same time redirect the ma

E

E.D.I

in ASP .NET ( How can i open a new window ligaly ( not a popup ) and
in the same time redirect the main page without registering a script
at start up which makes the explorer open the popup again when i press
back....
 
L

Lee

E.D.I.

Not sure exactly what you are looking for but:

To send the window to a new address from the server use without
opening a new window: Response.Redirect('url to open') or
Server.Transfer('url to open').

To open a new window, you need to do that from the client with script:
window.open('url to open','window name','attribute1,attribute2')

If this does not help, please explain what you need in a little more
depth.

L. Lee Saunders
http://oldschooldotnet.blogspot.com
 
E

E.D.I

actually there are 2 things i need to do in a one button click
1. open a new window or a new tab with a pdf
2. to navigate from the current window to another url

what i have done till now is working fine except there are 2 major
problems
1. the pop up blocker which block the new window
2. after i press back from the url i did navigate to it runs the
script that was registered and pops the pdf again

what i did in the code is
i have created a script in the c# code and registered it to the
startup.
in the script i used first window.open for the new window and
window.navigate for navigating to another url
i didnt use Response.Redirect('url to open') co's it dosn't run the
script for opening the new window

SO FOR MY BOSES REQUEST I NEED TO OPEN A NEW WINDOW OR TAB WHICH IS
NOT A POPUP
is it possible ? and how
tnx in advance
 
H

Hans Kesting

E.D.I presented the following explanation :
actually there are 2 things i need to do in a one button click
1. open a new window or a new tab with a pdf
2. to navigate from the current window to another url

what i have done till now is working fine except there are 2 major
problems
1. the pop up blocker which block the new window
2. after i press back from the url i did navigate to it runs the
script that was registered and pops the pdf again

what i did in the code is
i have created a script in the c# code and registered it to the
startup.
in the script i used first window.open for the new window and
window.navigate for navigating to another url
i didnt use Response.Redirect('url to open') co's it dosn't run the
script for opening the new window

SO FOR MY BOSES REQUEST I NEED TO OPEN A NEW WINDOW OR TAB WHICH IS
NOT A POPUP
is it possible ? and how
tnx in advance

I think the following will work:

In the OnClientClick of the button, call a javascript function that
opens your new window. This function should return "true".
In the code-behind Click handler (server click), do a redirect to your
new page.

The ClientClick (regular onclick on the html button) is executed first,
before the postback action (and if it returns 'false', the postback
will not happen)

By the way: this question belongs in the "framework.aspnet" newsgroup)

Hans Kesting
 

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