WebContext.ApplicationPath 属性

定义

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

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

属性值

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

示例

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

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

适用于