Answer Posted / poornima p
In ASP.NET exception handling is achieved using the Try ?
Catch ? Finally block. All the three are ASP.NET keywords
and are used do exception handling. The try block encloses
the statements that might throw an exception whereas catch
block handles any exception if one exists. The finally
block can be used for doing any clean up process. Any
general ASP.NET exception forces the application to
terminate without allowing the code to continue executing,
resulting in an error page.
<Script runat=server>
Public Page_Load(sender As Object, e As EventArgs)
{
try
{
// Statements that are can cause exception
}
catch(Type x)
{
// Statements to handle exception
}
finally
{
// Statement to clean up
}
}
</Script>
Custorm Errors:
The default settings that is available in machine.config is
as follows
<customErrors mode="RemoteOnly"/>
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain the server control events of asp.net ?
What r the asp.net list controls and diff. Between them?
Are xaml file compiled or built on runtime?
What is route in web api?
How we can force all the validation controls to run?
How are sessions stored?
What is postback in asp net?
How to bind all the binding controls in a page at once in ASP.NET?
Why session is necessary in web application?
Explain transparent caching with aop?
What is Dynamic Web and discuss its usage with the help of real life examples?
Is global asax mandatory?
What is request and response in asp.net?
Can we use a static function with a non-static variable?
How can you implement the postback property of an asp.net control?