By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,446 Members | 2,998 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,446 IT Pros & Developers. It's quick & easy.

response.redirect

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

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

P: n/a
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.