simple one. what does the tilda backslash mean in urls?

Posted on 2008-11-17
Last Modified: 2012-06-21
Hi there,
I ve been working with menu controls and I ve noticed when you make hyperlinks to pages on the site it uses the tilda backslash in links. e.g. ~/FolderName/FileName.aspx
Is it something to do with the project root?

I have the following structure.  
+ ShowUsers
|_ +  Online
    |_ default1.aspx
   +  Denied
    |_ +  Example
        |_  default2.aspx

Normally, to make a link to default1.aspx from default2.aspx I would have used /ShowUsers/Online/default1.aspx
but thats assuming that the project is deployed to a virtual directory with the same name as the project.
It would be much better to use ~/Online/default1.aspx.
Is this right?
Question by:osion
    LVL 14

    Accepted Solution

    yes you are right ,~ menas root directory

    if  you deployed to a virtual directory with the same name as the project( that here is "ShowUsers") then root directory will be ShowUsers

    i.e : "~" = "ShowUsers\"

    Author Comment

    Thats great! thanks for the rapid reply!
    If the virtual directory was ShowUsersNew it would still work then?
    LVL 14

    Assisted Solution

    yes... but you should use "~/folderName/pageName.aspx" like format

    Author Comment

    brilliant. thanks so much. been playing about with it and couldnt get any meaningful search results in google :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now