Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

WebObjectUtils.GetPageType Method

Returns the Type of the ASPX page referred to by the supplied pageUrl.

[Visual Basic]
Public Shared Sub GetPageType( _
   ByVal pageUrl As String _
)
[C#]
public static Type GetPageType(
   string pageUrl
);

Parameters

pageUrl
The filename of the ASPX page.

Return Value

The Type of the ASPX page referred to by the supplied pageUrl.

Remarks

As indicated by the exception that can be thrown by this method, the ASPX page referred to by the supplied pageUrl does have to be instantiated in order to determine its see cref="System.Type"/>

Exceptions

Exception Type Condition
ArgumentNullException If the supplied pageUrl is a null reference (Nothing in Visual Basic) or contains only whitespace character(s).
ObjectCreationException If this method is not called in the scope of an active web session (i.e. the implementation this method depends on this code executing in the environs of a running web server such as IIS); or if the page could not be instantiated (for whatever reason, such as the ASPX pageUrl not actually existing).

See Also

WebObjectUtils Class | Spring.Objects.Factory.Support Namespace