473,520 Members | 2,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Redirect question

I am sure this is a simple question but I am drawing a blank:

When developing on localhost if I do the following everything is fine:

HttpContext.Current.Response.Redirect("../this_folder/that_folder/apage.aspx")

Takes me to: http://localhost/this_folder/that_folder/apage.aspx

However on my live site there it resides in a subweb and hence there is
another folder involved in the path:

http://www.mysite.com/extrafolder/th...der/apage.aspx

How do I get around this?

Thanks

Apr 27 '06 #1
3 909
Tim
make your dev environment match your live environment. your life will
be better because of it.

or look at the server variable that gives the address then
if localhost do onething
else do another.

or set a global variable path="" or path="extrafolder" accordingly.

Apr 27 '06 #2
I would like the two environments to match, that would seem to make
most sense.

The production environment is set in stone and has to be the subweb
setup I mentioned

How would I match that in the dev environment, i.e. is it possible to
add an extra folder that can be excluded from the project when
publishing?

Apr 27 '06 #3
Or failing that, how do I redirect to an absolute path?

Apr 27 '06 #4

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

Similar topics

5
2179
by: Steve Lutz | last post by:
Hello, I have a page that creates a class, and then on certain conditions, redirects user to another page. The class has a Class_Terminate() function that saves itself to a database. The class comes from an includes ASP file, it isn't a COM object. Here's my code outline (not actual code for brevity - in otherwords, there may be syntax...
2
7780
by: Robert Gordon | last post by:
I now realize I probably should have tried posting this on the IIS board first.. I am running OWA 2003 Server as Front End server to my Exchange 2000 native domain. The FE server is secured by a 128 bit SSL cert. The OWA 2003 server is running on Windows 2003 server in a Windows 2003 native AD domain. At present, the server is...
4
3040
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")
1
15279
by: Peter Kirk | last post by:
Hi there I have a program written by another company (it's a "web control" which returns a web-page: can I compare this to a servlet in the Java world?), which they think is causing problems on their server. But no-one really knows if this program is at fault because the problem only exhibits itself every once and a while, and the only...
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 = "%"
7
1662
by: Markus McGee | last post by:
Hi all, I have a quick question...I believe. On my web page, call it page A, I have a drop downlist with runat server enabled. When the drop downlist change event occurs it repopulates a table depending on the value selected on page A. After I redirect page A to some other page, call it page B, and use the IE Back button to change my...
2
5930
by: news://news.microsoft.com/microsoft.public.de.germ | last post by:
Hallo! Ich habe ein Frameset mit 3 Frames. Im 1. Frame wird eine ASPX-Seite geöffnet. In dieser werden einige Steuerelemente angezeigt. Nun soll bei bestimmten Benutzeraktivitäten eine andere ASPX-Seite geöffnet werden, und zwar in einem der beiden anderen Frames. Mein Problem ist, dass die Seite, die geöffnet werden soll, manchmal im 2....
1
4244
by: David | last post by:
I need to redirect to a page and HTTP Post data. The Response.Redirect does not work and the HTTPREQUEST option calls the page and waits for a response, but I need to transfer control to the page. Eg. Redirect and POST data. The only way I can see to do this is to format a HTML/POST, with Javascript, page and use the RESPONSE.WRITE...
3
5483
by: Alan Silver | last post by:
Hello, Sorry if this is a stupid question, but I can't really see much difference between these tow methods according to the scant info in the SDK. Could anyone enlighten me? TIA -- Alan Silver
9
4331
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...
0
7602
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...
0
7559
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5740
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5125
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...
0
4788
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...
0
3282
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...
0
3279
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1646
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
1
836
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.