473,796 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

response.redire ct

Hi,

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

Thanks Hugh
Jul 19 '05 #1
5 14229
Hugh Welford wrote on 21 aug 2004 in
microsoft.publi c.inetserver.as p.general:
is it possible to open a page in a new window with response.redire ct,
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.publi c.inetserver.as p.general:
is it possible to open a page in a new window with response.redire ct,
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.redire ct,
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.Attrib utes.Add("OnCli ck",
"javascript:win dow.open('yourn ewpage.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.publi c.inetserver.as p.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.redire ct, 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.Attrib utes.Add("OnCli ck",
"javascript:win dow.open('yourn ewpage.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('myOtherF ile.asp')">
Redirect me</button>

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

or a serversided ASP one:

<%
if request.form("r edirect")='Redi rect me' then
response.redire ct "myOtherFile.as p"
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
3909
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 "http://www.domain2.com/VDIR2/table.asp" & "?PubID=" & PubID & "&PubName=" & PubName The query string is data to open a DB. the page displays
4
3063
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 process the page? Basically, with the following code: Response.Redirect("../newpage.asp")
4
14631
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
4327
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 serves two purposes, 1. it contains a tab strip with response.redirects to navigate to the other pages; 2. I authenticate the user by check to see if a cookie exists, if it doesn't I redirect to a login screen.
3
818
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 is the code: If (sServiceCenter = "*ALL") Then sServiceCenter = "%"
13
4705
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 try-catch? Try Response.Redirect(strPage) Catch ex1 As Threading.ThreadAbortException ex1 = ex1 'Cancel Respone here
10
9517
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 stateInfo) at System.Web.HttpResponse.End() at System.Web.HttpResponse.Redirect(String url, Boolean endResponse) at WebApplication1.WebForm4.DropDownList1_SelectedIndexChanged(Object sender, EventArgs e) in...
5
4573
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 a session variable, and if it is not present, does a Response.Redirect to a webpage for the CAS passing a url parameter for the url to post back to. The CAS provides a page for the user to log into, validates the username and password, and then...
4
11438
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 XMLHTTP object. However, when the page requested through the XML object makes a <%Response.Redirect()%> call, a new session is created each time. Is this a flaw in the XMLHTTP Object? How can I force the session to remain the same after a...
9
4350
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). The browser then makes a new request to the server to redirect itself to abcd.asp after which the user gets redirected to abcd.asp. But in case of Server.Execute (or Server.Transfer), when the server
0
9680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10456
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10230
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10174
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7548
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5442
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.