Response.Redirect in ASP

While using response.redirect <url>
i want to open the redirected url to be opened in a new window,
just like a <target> option in client side javascript.

Any suggestions!!!!

Ravindran
nravindranAsked:
Who is Participating?
 
daveamourCommented:
As an afterthought - as soon as you have coded as I said you should call Response.Flush

Dave
0
 
daveamourCommented:
Rather than using response.redirect use

Response.Write ("<Script Language='JavaScript'>"
Response.Write ("window.location.href = 'http://yourpage.htm';")
Response.Write ("</Script>")

Hope this helps

Dave
0
 
daveamourCommented:
oops thats totally wrong sorry

use the above logic but us

Response.Write ("newWin = window.open ('http://yourpage.htm','NewWin','');")

for the middle line

Dave
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
xabiCommented:
You can't do it via a response.redirect. You can only do this via javascript or VBScript (but from the client side, not the server side). Remember that response.redirect is a server side method.

xabi
0
 
nettromCommented:
I though you also could issue a META refresh with base target set to "_blank", e.g output:

<meta http-equiv="Refresh" content="0;URL=http://www.myserver.com/mypage.html">
<base target="_blank">
0
 
daveamourCommented:
You could do as nett says but this would have to be conditionally written using the Response Object otherwise the page would never load in the first place
0
 
daveamourCommented:
You could do as nett says but this would have to be conditionally written using the Response Object otherwise the page would never load in the first place
0
 
daveamourCommented:
Woooooo hooooooo I beat xabi to some points

0
 
xabiCommented:
daveamour i just make this:

Question --> Answer
He asked to do it with response.redirect and I said no.

xabi
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.