Gets the virtual path of the application root and makes it relative by using the tilde (~) notation for the application root (as in "~/page.aspx").
Assembly: System.Web (in System.Web.dll)
The following example uses the property to set the URL of an Image control to an image in the same directory as the page. Run this page at different levels of a directory structure to see the resulting property values.
The following example uses the property to programmatically set the path to a resource, based on the current path of the page.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.