Re: ~ character

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: S. Justin Gengo (sjgengo_at_aboutfortunate.com)
Date: 04/16/04


Date: Fri, 16 Apr 2004 08:29:30 -0500

The tilde character represents the root of the web site. It automatically
starts you at the base folder.

So for example, if your folder structure was: c:\inetpub\wwwroot\mysite

And inside of the site you had the folders:
pages
images

Normally if you were in the pages folder and needed to access an image you
would have to use "..":
<img src="../images/myimage.gif">

Of course if you had another folder inside of pages and you were in a file
there you'd need two sets of "..":
<img src="../../images/myimage.gif">

But using the tilde you automatically start at the root directory and don't
need to know how far back in the directory structure any folder is:
<img src="~/images/myimage.gif">

-- 
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
                            Nietzsche
"suzy" <suzy@spam.com> wrote in message
news:faQfc.20470$Z07.6303@news-binary.blueyonder.co.uk...
> i have seen examples where the ~ character is used in the web.config file
> when storing directories.
>
> eg: ~/files/data.xml
>
> what does that character mean?
>
>
>


Relevant Pages

  • Re: Manually Created Web Site Does Not Work - What am I Missing?
    ... For each different Web site ... have the same name or folder structure as my VS project. ... The ASP.NET Dev Server runs as the Administrator account in VS 2008. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Word/Character Count for a Group of Documents
    ... and character count in a table ... Dim sPath As String ... Dim sActivePath As String ... ' Make sure that the active document is not in the folder ...
    (microsoft.public.word.vba.general)
  • Re: Document Not Saved error
    ... If you can send me a copy of the test file (better zipped in your folder structure), I'd be happy to investigate it. ... Macintosh Business Unit, Microsoft ... underscore counts as a special character. ...
    (microsoft.public.mac.office.excel)
  • Re: Error 1324
    ... I cannot find any reference to the "The Folder Path Contains an Invalid ... The Folder Path Contains an Invalid Character ... The Windows Installer CleanUp Utility does not: ...
    (microsoft.public.windowsxp.general)
  • Re: Windows server 2003 File system problem
    ... It's hard to identify the exact cause from the description, but I'm suspicious that there's a hidden, non-visible character ending up in the file/folder name somehow. ... config file the client maintains for it's instructions. ... what folder the file is to be placed in by the FTP process. ...
    (microsoft.public.windows.server.sbs)