Home > Interview Questions > ASP.NET > How do you get last exception in asp.net?

How do you get last exception in asp.net?

by Thamil   on 05/10/2015   Category: ASP.NET   |  Level: Advance   |  Views: 962    |  Points: 25     |  Gold 


By using Server.GetLastError()
public void Application_Error(object sender, EventArgs e)
{
//Get the previous exception
Exception ex = Server.GetLastError();
}



« Lists the GridView events in asp.net?
» What is the use of session state in asp.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