Home > Interview Questions > Exceptions > How do you handle exceptions in the asp.net web form using error events?

How do you handle exceptions in the asp.net web form using error events?

by Spidy   on 18/05/2011   Category: Exceptions   |  Level: Intermediate   |  Views: 1401    |  Points: 25     |  Silver 


Using page error event (page_error) and retrieve error using GetLastError() method from server object

protected void Page_Error(object sender, EventArgs e)
{
Response.Write(Server.GetLastError());
Server.ClearError();
}



« How do you acces/modify the Master page label from Content page?
» How to fill dataset using DataAdapter using ADO.NET?
Post Question  |  Question Home

Recent Posts

User Responses


No response found, be the first to review this question.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts