PageRouteHandler Constructor (String)

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Initializes a new instance of the PageRouteHandler class.

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

public PageRouteHandler(
	string virtualPath


Type: System.String

The virtual path of the physical file for this Route object. The file must be located in the current application. Therefore, the path must begin with a tilde (~).

Exception Condition

The virtualPath parameter is null or is an empty string or does not start with "~/".

When you use this constructor, the CheckPhysicalUrlAccess property is set to true.

.NET Framework
Available since 4.0
Return to top