How to find the server last error?

 Posted by vishalneeraj-24503 on 12/1/2014 | Category: Visual Studio Interview questions | Views: 306 | Points: 40
Answer:

We have a Server static method called GetLastError() through which we can find the Last error which gets occur.
For Example:-
Exception last_err = Server.GetLastError();

if (last_err != null)
Response.Write(last_err.Message);


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response