473,467 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

~ explication

Hello,

What is the meaning of the ~ caracter in a Url

ex: "~/folder/..." ?

Regards
Jul 19 '05 #1
2 1284
~ is the home directory on Unix.

I don't really know what it can mean in a URL, though (which user?)

Bruno.

"Vantroeyen" <N.******************@axilog.fr> a écrit dans le message de
news:02****************************@phx.gbl...
Hello,

What is the meaning of the ~ caracter in a Url

ex: "~/folder/..." ?

Regards

Jul 19 '05 #2
"Vantroeyen" <N.******************@axilog.fr> wrote in message
news:02****************************@phx.gbl...
Hello,

What is the meaning of the ~ caracter in a Url

ex: "~/folder/..." ?

In the context of an ASP.NET application ~ stands for the application
directory and most properties and methods using url will replace ~ with the
application root virtual path during rendering. This is very useful if you
want to reference a ressource without knowing the name of the application
directory.

Instead of writing urls like:
/myapp/images/ok.gif -> that could fail if myapp is once moved to
/allapps/myapp...
/images/ok.gif -> same problem
.../../images/ok.gif -> relative urls not always accepted and problems if the
owner page is moved

You would write :
~/images/ok.gif

I have tested this kind of urls for :
HttpResponse.Redirect
Hyperlink.ImageUrl, HyperLink.NavigateUrl
Image.ImageUrl

But I could not manage to find a proper documentation on this behaviour.

Hope it helps.
DK

Jul 19 '05 #3

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

Similar topics

3
by: Raymond H. | last post by:
Bonjour, Est-il possible d'exécuter seulement un msgbox dans l'événement clik d'une ToolBar mais sans que le bouton en question (de la ToolBar) ne s'enfonce mais reste normal sans enfoncement ?...
8
by: josema | last post by:
Hi to all I have a asp page that have an array for instance: <% a(0)=0 a(1)=1 a(2)=2 a(3)=3 %> I would like to show each element of the array with
6
by: 2obvious | last post by:
This is a pipe dream, I realize, but I'm trying to emulate the functionality of the W3C DOM-supported document.getElementsByTagName method under the very nightmarish Netscape 4. Through some...
0
by: Marc Alfonsi | last post by:
Hi, I want to set up a cookie in a web page. We use ISML file which contains HTML and ISML code (particular language), translated into a JavaServerPages template (jsp). The JSP file is then...
3
by: robert | last post by:
Hi everyone, I have a little question. In Visual studio 6 the MFC is based under API WIN 32. In dot net, the MFC of dot net, are based on API of dot net or on API WIN 32? And my last...
11
by: DraguVaso | last post by:
Hi, I should use XML to synchronize the data from different (VB.NET) applications, and I was just wondering which Overloads of these functions ( ReadXmlSchema, ReadXml and WriteXml) goes the...
5
by: Hans Van den Eynden | last post by:
I thought that integers resized on the stack and that a value type was just defined in the scope of the function. And when the function returns the local variables were removed from the stack. But...
2
by: Vantroeyen | last post by:
Hello, What is the meaning of the ~ caracter in a Url ex: "~/folder/..." ? Regards
18
by: katasterisma | last post by:
I have search a lot in the web, but I was not able to find something useful!! SCENARIO: I have my home page and I open a pop-up window. The user can browse in the pop-up window seeing pages...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
1
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...
0
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...
0
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...
0
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...
0
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...

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.