473,326 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

response.redirect

Hi,

is it possible to open a page in a new window with response.redirect, and if
so, what is the syntax

Thanks Hugh
Jul 19 '05 #1
5 14132
Hugh Welford wrote on 21 aug 2004 in
microsoft.public.inetserver.asp.general:
is it possible to open a page in a new window with response.redirect,
and if so, what is the syntax


No, a new window is a clientside thing.
ASP does not know about windows.

ASP does not push code, it is asked by the broweser for code.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
Thanks Evertjan - should have thought a bit more about it

Regards Hugh
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn*******************@194.109.133.29...
Hugh Welford wrote on 21 aug 2004 in
microsoft.public.inetserver.asp.general:
is it possible to open a page in a new window with response.redirect,
and if so, what is the syntax


No, a new window is a clientside thing.
ASP does not know about windows.

ASP does not push code, it is asked by the broweser for code.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Jul 19 '05 #3
Hugh Welford wrote:
Hi,

is it possible to open a page in a new window with response.redirect,
and if so, what is the syntax

Thanks Hugh


Only if the page being redirected to contains client-side code to open a
page in a new window.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #4

If you want to redirect with a button....
just put below codes into page load event

cmdPrint.Attributes.Add("OnClick",
"javascript:window.open('yournewpage.aspx')")

(cmdPrint is the name of a example button....)

Greetingz

Marchu
Netherlands
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #5
Mar Chu wrote on 21 sep 2004 in microsoft.public.inetserver.asp.general:
Bob Barrows [MVP] wrote on 22 aug 2004 in
Hugh Welford wrote:
is it possible to open a page in a new window with
response.redirect, and if so, what is the syntax


Only if the page being redirected to contains client-side code to
open a page in a new window.

If you want to redirect with a button....
just put below codes into page load event

cmdPrint.Attributes.Add("OnClick",
"javascript:window.open('yournewpage.aspx')")

(cmdPrint is the name of a example button....)


[quoting restored]

Marchu, I fear you are talking ASP.net.

This is a classic asp only NG. [jammer dan]

===============

Hugh, you could try a pure clientside javascript solution
[OT on this NG]:

<button onclick="window.open('myOtherFile.asp')">
Redirect me</button>

================

or a serversided ASP one:

<%
if request.form("redirect")='Redirect me' then
response.redirect "myOtherFile.asp"
end if
%>

<form method=post target='_blank'>
<input type=submit name=redirect value='Redirect me'>
</form>

=================

not tested

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paul | last post by:
I'm not getting the results I want when I use Response.Redirct in a ASP page. I enter this line of code in a asp page from domain1.com. Response.Redirect...
4
by: JC | last post by:
Hi, I have a simple question regarding the Response.Redirect method. Does the server stop processing the ASP code as soon as it encounters the Redirect command? Or does it ever continue to...
4
by: TomT | last post by:
Hi.. I'm redirecting users to another page using: response.redirect("newpage.asp") this works... But I need to add a variable to the page specified.. IE: newpage.asp?id=JobID
6
by: Sam | last post by:
I have some issues with HTTP Headers and I was hoping for some pointers or references to good articles. Here is the problem. I have 6 .aspx pages, each page contains a common .ascx. This ascx...
3
by: Sehboo | last post by:
On my ASP page, when I click a button, I want to do three things: 1. Check for some values. 2. Open a new window and pass some values as query string. 3. Redirect to some other page Here...
13
by: Tim | last post by:
Hello, Is there a way to "cancel" a response.Redirect? For example, in the code below, could I insert anything in the Catch statement that would cancel the redirect and resume flow after the...
10
by: Niggy | last post by:
I get an error - any help appreciated. System.Threading.ThreadAbortException: Thread was being aborted. at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object...
5
by: venner | last post by:
I'm having an issue with an ASP.NET website after upgrading to ASP.NET 2.0. The website makes use of a central authentication service (CAS) provided at the university I work for. Each page checks...
4
by: mike.biang | last post by:
I have an ASP page that is using an XMLHTTP object to request various pages from my server. I keep a single session throughout the XMLHTTP requests by bassing the ASPSESSIONID cookie through the...
9
by: RN1 | last post by:
When a server encounters the line Response.Redirect("abcd.asp") in a ASP script, the server tells the browser that it has to be redirected to another page (which is abcd.asp, in this case)....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.