Asp.net - How to find last error which occurred?



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

Post New Answer

More ASP.NET Interview Questions

can we pass values from one page to another page without redirecting to that page?

6 Answers   Google, Patni, Syntel, Wipro,


If i have a page where i create an instance of a dll and without invoking any method can I send values to next page ?

1 Answers   Satyam,


Explain about Application and Session Events ?

0 Answers  


How is mvc different from asp.net? : Asp.Net MVC

0 Answers  


How to sign out from forms authentication?

0 Answers  






What is the Difference between MVC And MVP design pattrens

0 Answers   Symphony,


Explain login controls.

0 Answers  


What are the different session state management options available in asp.net?

0 Answers  


can i inherit one web applications into another web applications in asp.net?

7 Answers  


What is the difference between a session object and cache object

2 Answers   CitiGroup, PennyWise,


Hi, I am developing an application (quiz engine) using C# in Dot net. My problem is I am designing the selction option using radio button. So, I want to retrive the data from the database to the radiobutton option. And also please tell me the how to compare the correct answer option with Answer selected by the users. If any body knows or have done this before please Help me out. My mail id is get_rome@yahoo.co.in. Table format: Question Id Queston Option1 Option 2 Option 3 Option 4 Correct answer 1 What is ur name? My name is ….. My name …. My name …. My name …. My name is tom

4 Answers  


Let's say I have an existing application written using vb6 and this application utilizes windows 2000 com+ transaction services. How would you approach migrating this application to.net?

0 Answers  


Categories