asp.net.ph

Page.ErrorPage Property

System.Web.UI Namespace   Page Class


Sets or retrieves the error page to which the requesting browser is redirected in the event of an unhandled page exception.

Syntax


Inline <%@ Page ErrorPage = strFileUrl ... >
Script Page.ErrorPage [ = strFileUrl ]

Property Value


strFileUrl String that specifies the URL of the error page to which the browser is redirected.

The property is read/write with no default value.

Remarks

NOTE: This property can also be set declaratively using the @ Page directive.

Example

The following shows how to programmatically set the ErrorPage property at design time.

void Page_Load ( object src, EventArgs e ) {
   if ( !IsPostBack ) {
      this.ErrorPage = "myErrorPage.aspx";
   }
}
  C# VB

See Also

Page Members   @ Page Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph