How to display errors using Page_Error event of Page Object?

//In InitializeComponent
this.Error += new System.EventHandler (this.Page_Error );

//
private void Page_Error(object sender, System.EventArgs e )
{
     Response.Write(Server.GetLastError().ToString());
     Server.ClearError ();
}

你可能感兴趣的:(display)