S
Sam Solomon
Dear All,
I am using Page_Error event in my aspx page to generate an error. Below is
my code in my Page_Error event:
private void Page_Error(object sender,System.EventArgs e)
{
Response.Write("Error:\n");
Exception ex = Server.GetLastError();
Trace.Write("Message",ex.Message);
Trace.Write("Source",ex.Source);
Trace.Write("Stack Trace",ex.StackTrace);
Response.Write("Sorry, an error was encountered.");
Context.ClearError();
}
However the error is not generated because AutoEventWireup property is set
to "false". When I set the AutoEventWireupto "true" is can see the error. I
want to know the reason behind this whats AutoEventWireup got to do with
Page_Error event. . How are they both co-related.
Any help would be greatly appreciated
cheers,
Sam Solomon
I am using Page_Error event in my aspx page to generate an error. Below is
my code in my Page_Error event:
private void Page_Error(object sender,System.EventArgs e)
{
Response.Write("Error:\n");
Exception ex = Server.GetLastError();
Trace.Write("Message",ex.Message);
Trace.Write("Source",ex.Source);
Trace.Write("Stack Trace",ex.StackTrace);
Response.Write("Sorry, an error was encountered.");
Context.ClearError();
}
However the error is not generated because AutoEventWireup property is set
to "false". When I set the AutoEventWireupto "true" is can see the error. I
want to know the reason behind this whats AutoEventWireup got to do with
Page_Error event. . How are they both co-related.
Any help would be greatly appreciated
cheers,
Sam Solomon