通过


HostingEnvironment.ApplicationVirtualPath 属性

定义

获取应用程序的根虚拟路径。

public:
 static property System::String ^ ApplicationVirtualPath { System::String ^ get(); };
public static string ApplicationVirtualPath { get; }
static member ApplicationVirtualPath : string
Public Shared ReadOnly Property ApplicationVirtualPath As String

属性值

没有尾部斜杠的应用程序的根虚拟路径(/)。

注解

ApplicationVirtualPath 属性始终返回“/" 作为返回值的第一个字符。 如果应用程序位于网站的根目录中,则返回值只是“/"

适用于