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

which type of data u send through request.querystring()?and tell abt exact size?

1 Answers   CSC, Nay Company,


Name and describe some HTTP Status Codes and what they express to the requesting client ?

1 Answers  


What is the life-span of the items in the viewstate?

0 Answers  


What is the file extension of web service?

0 Answers  


What is difference between asp state management and asp.net state management? How can we pass info between 2 asp.net pages?

0 Answers  


what is view stat how it is use ?

2 Answers   Amazon,


List the advantages and disadvantages of user control an custom control?

0 Answers  


How do you identify that the page is postback?

0 Answers  


1. What is the difference between Cache and Session? 2. I cache limited to page like viewstate or it's accessible through out the application like session? 3. Which one is better when I've some data that is to be used across the application? Why is to better than the other?

2 Answers   247Customer,


About dataset and data mining ?

1 Answers   Cognizant,


I have around 200+ controls in a page. Each of the sets of controls are kept in divs and when header div is clicked, only those div controls pertaining to that header div will be displayed. Rest of the divs are kept invisible. When the page loads, all these 200+ controls are loaded simultaneously, that consumes much of the time. What my requirement is I want to get the div1 controls loaded when the page loads and rest of the div controls should be loaded asynchronously. it should not be loaded with page load, so that time for loading the page can be much minimised. Hope u understood my question and pls help me out with a solution asap....

2 Answers  


What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?

1 Answers   Infosys, KPIT,


Categories