469,586 Members | 2,185 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,586 developers. It's quick & easy.

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 13651
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Paul | last post: by
6 posts views Thread by Sam | last post: by
3 posts views Thread by Sehboo | last post: by
13 posts views Thread by Tim | last post: by
10 posts views Thread by Niggy | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.