Asp.net - How to find last error which occurred?
Answer / p.ramakrishna
Exception LastError;
String ErrMessage;
LastError = Server.GetLastError();
if (LastError != null)
ErrMessage = LastError.Message;
else
ErrMessage = "No Errors";
Response.Write("Last Error = " + ErrMessage);
Is This Answer Correct ? | 14 Yes | 0 No |
What three Session State providers are available in ASP.NET 1.1? What are the pros and cons of each ?
Why the javascript validation not run on the asp.net button but run successfully on the html button?
Can I stream live content/events?
What is a Metadata?
What is the difference between response.redirect and server.transfer, how to choose one among the other?
How many languages are supported by .NET at present time?
How information about the user's locale can be accessed?
Can we mention error in web.config file?
Explain how is a property designated as read-only?
What is the significance of finalize method in .net?
What are session variables?
What are the different types of sessions in asp.net? Name them?