How do you handle unhandled exceptions in ASP.NET?.
Answers were Sorted based on User's Feedback
Answer / madhu
By giving
Try
{
any thing u want to give without exception
}
catch
{
here exception takes
}
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / s
try
{
here u have to write ur code
}
catch (Exception ex)
{
here if u get any error it was handled by Exception ex
}
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / raviraj
usually we handle exceptions in an appication using try ...
catch block.....If this structured exception too failed (as
you said the case of unhandled exception)Then we can define
user defined execeptions by creating a class which inherits
the application exception.The exception that contained in
the method of the class will automatically handled by the
throw new exception statement ,which contains the error
message.
Is This Answer Correct ? | 1 Yes | 0 No |
Disable Mouse right click on web page in asp.net?
What is clickid?
Why viewstate is used in asp.net?
If we write return statement in finally block will it works fine or throws any error?
What are sharepoint pages?
Difference between ASP & ASP.NET Session State
What are the differences between code behind and code inline?
can sn.exe can be used before gacutil.exe
How ASP and ASP.NET page works.
How do you handle unhandled exceptions in ASP.NET?.
How do you deploy your asp.net application?
What is the viewstate in asp.net?