473,797 Members | 2,934 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP response.redire ct: absolute or relative addressing or both?

1 New Member
Can you use relative addressing when using response.redire ct; i.e something that would look like this
<% if session("superu ser") <> true then response.redire ct "../../../edit/logout.asp" %>
or does it have to be absolute addressing. For the life of me I can’t find this explicitly written anywhere and I have been using file and virtual to include other pages so I’m curious to know how redirect works. I apologise if this question is silly for some but I’m not an asp programmer, I am just helping updating an existing asp site.

Thank you for your time
Aug 14 '07 #1
1 4142
ilearneditonline
130 Recognized Expert New Member
Can you use relative addressing when using response.redire ct; i.e something that would look like this
<% if session("superu ser") <> true then response.redire ct "../../../edit/logout.asp" %>
or does it have to be absolute addressing. For the life of me I can’t find this explicitly written anywhere and I have been using file and virtual to include other pages so I’m curious to know how redirect works. I apologise if this question is silly for some but I’m not an asp programmer, I am just helping updating an existing asp site.

Thank you for your time
What is right and what is wrong, I can't say. But I prefer to use absolute. And the reason for that is that let's say i want to have a list of start pages. And I want to include that as my navigation on all pages. If you use relative, it is possible that more times than not you will end up redirecting to a page that doesn't exist. If on the other hand you use absolute, then you always go to where you are expecting.
Aug 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

15
2910
by: Nick K. | last post by:
I recently began maintenance work on a production web server that is located in the root directory of a web server. I moved this into a sub web on my local web server in order to do work on it. I found that there is an include file that references images: <img src = "/images/Header.gif" What worked correctly on the production server breaks on mine because of the absolute address "/images". I removed the absolute address and changed...
3
1594
by: VapidGav | last post by:
Ok I am going a bit insane here. I have written a class which handles redirects to certain pages according to database settings. When I use the response.redirect from within my class I get this error message Server Error in '/Application' Application. ---------------------------------------------------------------------------- ----
0
1306
by: Jason Lawrence | last post by:
I have an attributed ATL project (call it B) that I am building with Microsoft Visual C++ .NET (55537-640-3684941- 18356). In the project I include the COM generated file A.h (from another ATL project A). The compiler interprets this and injects the command "import A.idl" into the idl for B. So far everything is okay. The problem is that when I build project B in debug, it references A.idl using the absolute path. When I build...
10
7937
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into the URL, in the format http://yourapplicationpath/(Session.SessionID)/... which saves numerous headaches when it comes to storing state across page requests and sessions.
1
2535
by: Andre Ranieri | last post by:
I have a quick question - I'd just like to have confirmation to be sure. I'm building an ASP.NET corporate site for my employer, some of the pages have e-commerce capability and will need to be SSL-encrypted. Thus, I assume I'll need to use absolute links to specifiy the https protocol (correct me if I'm wrong on that) Does ASP.NET handle an absolute link any different than a relative one? Will I have any problems maintaining session...
2
4897
by: Paul Bonfanti | last post by:
A customer of ours using .NET 2.0 on Win2003 is seeing relative URLs passed to Response.Redirect() being converted to absolute URLs in the Location header. For example '/test.aspx' becomes 'http://www.myserver.com/test.aspx'. We're not able to reproduce this on our machines. Does anyone know of a setting or configuration that would cause this behavior in Response.Redirect()? Thanks, Paul
6
3179
by: Jon Slaughter | last post by:
do I have to prefix every absolute path with document root to get it to work? For some reason I thought that prefixing a path with '/' or './' with make it absolute w.r.t to document root but I guess not? e.g., when I do include './Scripts/AddNav.php';
1
2135
by: bernie | last post by:
what is the difference between relative and absolute addressing?
18
2677
by: Paul Lautman | last post by:
JRough wrote: What do you mean by "redirect the output to Excel"??? Excel isn't a location, it's a spreadsheet program that some (but not all users) will have on their machine. BTW, Location: is supposed to take a fully qualified URL.
0
9685
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
9536
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10468
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...
1
10205
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
7559
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
6802
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
5458
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
4131
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
2933
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.