
Validate | 267
Page Class
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
virtualPath
A string containing an absolute or relative virtual path.
Example
The example maps the virtual path of the named page to its physical path:
Sub Page_Load( )
Message.Text = MapPath("MapPath.aspx")
End Sub
Notes
The Page.MapPath method duplicates the functionality of the Server.MapPath
method.
ResolveUrl
String = Path.ResolveUrl(strRelativeUrl)
Returns an absolute URL corresponding to a relative URL.
Parameters
String
A string containing the absolute URL.
strRelativeUrl
A relative URL.
Example
The example maps the current relative URL to an absolute URL:
Sub Page_Load( )
Message.Text = Page.ResolveUrl("ResolveUrl.aspx")
End Sub
Validate
Page.Validate()
Invokes the validation logic for each validator control on the page. When this
method is invoked, it iterates the Page object’s ValidatorCollection collection and
executes the validation logic associated with each validator control.
Example
See the example for the IsValid property.
Notes
The Validate method is called automatically when the user clicks any HTML or
ASP button control whose CausesValidation property is
True.