ערוך

שתף באמצעות


WebContext Constructor

Definition

Initializes a new instance of the WebContext class.

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)

Parameters

site
String

The name of the Web site.

applicationPath
String

The virtual path of the root level of the current Web application.

path
String

The virtual path of the Web.config file that the current configuration object represents.

locationSubPath
String

The path value of the location element that is currently being edited.

appConfigPath
String

The current Web application's configuration path.

Examples

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

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

Applies to