BuildManager::CreateInstanceFromVirtualPath Method (String^, Type^)

 

Processes a file, given its virtual path, and creates an instance of the result.

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

public:
static Object^ CreateInstanceFromVirtualPath(
	String^ virtualPath,
	Type^ requiredBaseType
)

Parameters

virtualPath
Type: System::String^

The virtual path of the file to create an instance of.

requiredBaseType
Type: System::Type^

The base type that defines the object to be created.

Return Value

Type: System::Object^

The Object that represents the instance of the processed file.

The CreateInstanceFromVirtualPath method works for compiled and non-compile pages.

.NET Framework
Available since 2.0
Return to top
Show: