Solved

Response.Redirect in ASP

Posted on 2000-03-17
9
188 Views
Last Modified: 2012-08-14
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
0
Comment
Question by:nravindran
  • 6
  • 2
9 Comments
 
LVL 19

Expert Comment

by:daveamour
ID: 2627057
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
 
LVL 19

Expert Comment

by:daveamour
ID: 2627064
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
 
LVL 8

Expert Comment

by:xabi
ID: 2627069
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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 19

Accepted Solution

by:
daveamour earned 50 total points
ID: 2627073
As an afterthought - as soon as you have coded as I said you should call Response.Flush

Dave
0
 
LVL 7

Expert Comment

by:nettrom
ID: 2627085
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
 
LVL 19

Expert Comment

by:daveamour
ID: 2627098
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
 
LVL 19

Expert Comment

by:daveamour
ID: 2627167
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
 
LVL 19

Expert Comment

by:daveamour
ID: 2627170
Woooooo hooooooo I beat xabi to some points

0
 
LVL 8

Expert Comment

by:xabi
ID: 2627208
daveamour i just make this:

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

xabi
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question