response.redirect

H

Hugh Welford

Hi,

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

Thanks Hugh
 
E

Evertjan.

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.
 
B

Bob Barrows [MVP]

Hugh said:
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.
 
M

Mar Chu

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
 
E

Evertjan.

Mar Chu wrote on 21 sep 2004 in microsoft.public.inetserver.asp.general:
Bob Barrows [MVP] wrote on 22 aug 2004 in
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
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top