Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Path Property

WebContext.Path Property

Gets the current virtual path of the Web application.

Namespace:  System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

public string Path { get; }

Property Value

Type: System.String
The current virtual path of the Web application.

The following example shows how to use the Path property. This code example is part of a larger example provided for the WebContext class.

// WebContext - Path.
Console.WriteLine("Path: {0}", webContext.Path.ToString());

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft