WebContext 생성자

정의

WebContext 클래스의 새 인스턴스를 초기화합니다.

public:
 WebContext(System::Web::Configuration::WebApplicationLevel pathLevel, System::String ^ site, System::String ^ applicationPath, System::String ^ path, System::String ^ locationSubPath, System::String ^ appConfigPath);
public WebContext(System.Web.Configuration.WebApplicationLevel pathLevel, string site, string applicationPath, string path, string locationSubPath, string appConfigPath);
new System.Web.Configuration.WebContext : System.Web.Configuration.WebApplicationLevel * string * string * string * string * string -> System.Web.Configuration.WebContext
Public Sub New (pathLevel As WebApplicationLevel, site As String, applicationPath As String, path As String, locationSubPath As String, appConfigPath As String)

매개 변수

pathLevel
WebApplicationLevel

WebApplicationLevel 개체입니다.

site
String

웹 사이트의 이름입니다.

applicationPath
String

현재 웹 애플리케이션의 루트 수준의 가상 경로입니다.

path
String

현재 구성 개체가 나타내는 Web.config 파일의 가상 경로입니다.

locationSubPath
String

현재 편집 중인 요소의 location 경로 값입니다.

appConfigPath
String

현재 웹 애플리케이션의 구성 경로입니다.

예제

다음 예제에서는이 생성자를 사용 하는 방법을 보여 있습니다. 이 코드 예제는 클래스에 제공된 더 큰 예제의 WebContext 일부입니다.

// Get the context.
WebContext webContext = (WebContext)config.EvaluationContext.HostingContext;
' Get the context.
Dim webContext As WebContext = config.EvaluationContext.HostingContext

적용 대상