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
Which property is used to identify the Page is Post Back in ASP.NET?
What is voluum?
Explain how is a property designated as read-only?
Explain an object, class and method.
What does postback mean?
Can you explain why it is useful to use mvc instead of webforms? : asp.net mvc
Can you explain composite pattern?
What is the difference between application state and caching?
Explain how dot net compiled code will become platform independent?
What is a viewstate?
What is the difference between union and structure?
How does cookies work in asp net?
What are query strings used for?
What is true about application service provider?
What a diffgram is, and a good use for one?