This documentation is archived and is not being maintained.

WebContext Constructor

Initializes a new instance of the WebContext class.

Namespace:  System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

public:
WebContext(
	WebApplicationLevel pathLevel, 
	String^ site, 
	String^ applicationPath, 
	String^ path, 
	String^ locationSubPath, 
	String^ appConfigPath
)

Parameters

pathLevel
Type: System.Web.Configuration::WebApplicationLevel
A WebApplicationLevel object.
site
Type: System::String
The name of the Web site.
applicationPath
Type: System::String
The virtual path of the root level of the current Web application.
path
Type: System::String
The virtual path of the Web.config file that the current configuration object represents.
locationSubPath
Type: System::String
The path value of the location element that is currently being edited.
appConfigPath
Type: System::String
The current Web application's configuration path.

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

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5 SP1, 3.0 SP1, 2.0 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: