通过


WebContext.Path 属性

定义

获取 Web 应用程序的当前虚拟路径。

public:
 property System::String ^ Path { System::String ^ get(); };
public string Path { get; }
member this.Path : string
Public ReadOnly Property Path As String

属性值

Web 应用程序的当前虚拟路径。

示例

以下示例演示如何使用该 Path 属性。 该代码示例是 WebContext 类中的一个较大示例的一部分。

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

适用于