Hi,<BR><BR>I tried this sample code from MSDN. But the page error event doesn&#039;t seem to be fired. If I run the page, only the regular error page is displayed with all the description, exception details, stack trace etc. Can any one tell me what is the problem and how to correct it.<BR><BR>Thanks.<BR><BR>&#060;code&#062;<BR><BR> void Page_Load(Object src, EventArgs args) <BR>{<BR> throw new ApplicationException("This is an unhandled exception.");<BR>}<BR><BR>void Page_Error(Object sender, EventArgs args) <BR>{<BR> Response.Write("Error:
");<BR> Exception e = Server.GetLastError();<BR> Response.Write("Sorry, an error was encountered." + e.Message);<BR> Context.ClearError();<BR>}