Error events in Part 70

  • دعنا نشارك هذا :
ترتيب الدرس : 70
المدة : 00:13:06
التحكم :
Text version of the video

Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.


All ASP .NET Text Articles

All ASP .NET Slides

All Dot Net and SQL Server Tutorials in English

All Dot Net and SQL Server Tutorials in Arabic

Handling exceptions using try/catch blocks is commonly termed as structured exception handling. provide 2 error events
1. Page_Error - This event is raised at the page level, when there is an unhandled exception on the page. The event handler resides on the page.
2. Application_Error - This event is raised at the application level, when there is an unhandled exception at an application level. The event handler resides in Global.asax fileThese error events can be used as a substitute or supplemental to structured exceptional handling.

Please note that
1. If the exception is not cleared in the Page_Error event, it gets propagated to the application level, and Application_Error event handler gets executed. If we are not clearing the exception at the application level, the application crashes with the "Yellow Screen of Death".

2. If the exception is cleared and redirection to Errors.aspx is not done, then a blank page is displayed.This is because web form processing is immediately stopped when an exception occurs.

If an exception is not handled at the page level using Page_Error event, it get's to the application level and can be handled using the Application_Error event handler in Global.asax and can be used as a single, centralized location for error handling.

سيتم تفعيل التعليقات قريبا

Sep 23, 2020 07:32:24