473,799 Members | 2,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

expressiong absolute paths in aspx


This is a simple issue I am trying to figure out.

How would I express absolute paths to various aspx files in the aspx
page. I am not intereted in relative paths.

For example, I want to encapsulate a HyperLink control in a user
control. Of course this user control can go anywhere vin various
subfolders, but when the link is clicked, I would like to set
NavigateUrl to a the same target page. So a rlative path won't work.
Thanks.
*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #1
2 1201
You probably mean server side subfolders.

Anyway, an absolute path won't be accepted on server side. The servers don't
do it for security reasons.

Eliyahu

"David Cho" <pr********@yah oo.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..

This is a simple issue I am trying to figure out.

How would I express absolute paths to various aspx files in the aspx
page. I am not intereted in relative paths.

For example, I want to encapsulate a HyperLink control in a user
control. Of course this user control can go anywhere vin various
subfolders, but when the link is clicked, I would like to set
NavigateUrl to a the same target page. So a rlative path won't work.
Thanks.
*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #2
David Cho wrote:
This is a simple issue I am trying to figure out.

How would I express absolute paths to various aspx files in the aspx
page. I am not intereted in relative paths.

For example, I want to encapsulate a HyperLink control in a user
control. Of course this user control can go anywhere vin various
subfolders, but when the link is clicked, I would like to set
NavigateUrl to a the same target page. So a rlative path won't work.
Thanks.


If you know the position of the target, relative to the root of the site,
AND that url is processed by the .net system (as in Hyperlink),
THEN you can write "root of application" as "~".
So "~/sub1/sub2/page.aspx" will always point to the same "page.aspx" ,
even if you move your app from development to hosting.

Hans Kesting
Nov 19 '05 #3

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

Similar topics

6
1885
by: David Siroky | last post by:
Hi! When I "compile" my python files with "python -OO ...." into pyo files then they still contain absolute paths of the source files which is undesirable for me. How can I deal with that? Thank you. David
1
3118
by: William Starr Moake | last post by:
Another problem with absolute paths in the WYSIWYG editor I'm putting together. The function to toggle between WYSIWYG and HTML modes works except for one glitch. If you use a relative path for a link, like <a href="download.htm">Click Here</a>, the editor returns an absolute path the second time you toggle HTML mode: <a href="C:\Windows\Desktop\Editor\download.htm" and even adds file:/// on the third try. This path must be manually...
4
6097
by: Vitali Gontsharuk | last post by:
Hallo! When using the XPATH document() function to load a new XML document, we are coming across problems, because XALAN seems to have problems with absolute paths. XALAN always assumes that the path is relative to the current directory. So if we e.g. are in "c:\xslt_scripts" and are trying to load an XML file from "c:\xml_files\test.xml" it ist trying to open a file with the following absolute path:...
7
78648
by: Rizaan Jappie | last post by:
is it possible to get the relative path based on a absolute path in c#? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
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...
0
1321
by: Chris Gill | last post by:
I'm trying to use cookieless sessions in asp.net using the InProc mode (for various reasons it is not desirable for us to use the other modes if it is possible to avoid them). My problem revolves around the use of absolute and relative paths under this mode. Obviously absolute paths break the sessionId tracking in the url, which in our system relates to the user logins, causing the users to be logged off immediately. Clearly the simple...
3
1891
by: JeffDotNet | last post by:
I wrote a small data processing application that writes a summary of several hundred files. I use drag and drop on a panel (Panel1) to grab the absolute path to each of these files. Then I begin analyzing all of the files. I noticed (on the same machine) that some user profiles appear to abbreviate the absolute paths to these files thus breaking my data loading mechanism. Does anyone know how I can programmatically change this filepath...
19
5114
by: Jerry M. Gartner | last post by:
Greetings: What is the best way to resolve paths within a document regardless of what path it is opened under? For example: I have x.php and it contains <img src="images...">, (amongst other things, like php code), which resolves the correct image path when opened under / but when x.php is read into a file under /dir the image no longer resolves, for obvious reasons. With absolute paths, this isn't an issue but it is with relative...
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';
0
9546
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
10268
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
10247
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,...
0
10031
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9079
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7571
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
6809
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
5593
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
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

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.