Asp.net - How to find last error which occurred?
Answer Posted / 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 View All Answers
What is request and response in asp.net?
What is viewstategenerator?
Explain form level validation and field level validation?
What is difference between asp state management and asp.net state management?
What is application variable?
How to deploy/publish webservices?How many ways?Plz explain me
if i want to give an alert message like "try after sometime" to a web page which is being seen by other person.if a web page is not seen by anyone then it should display otherwise it show a display a message stating that other person is viewing so try after some time........how can i implement this.
Can you explain page lifecycle in net?
Explain asp.net application life cycle?
What is the parent class of all web server control?
Which is faster union or union all?
To display data in a Repeater control which template you provide?
What is ASLM?
What is application variable in asp.net?
What is the difference between web config and machine config files?