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 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.