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)
Use this property to provide URL information that will stay the same even if the application changes location. This allows the same URL-mapping code to be used in a test environment and in the final deployment environment, or to be used by copies of Web applications in different domains.
The following example uses the 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.property to set the URL of an
The following example uses theproperty to programmatically set the path to a resource, based on the current path of the page.
Available since 2.0