Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can u handle Exceptions in Asp.Net?

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


Please Help Members By Posting Answers For Below Questions

What is the concept of view state in asp.net?

1053


How can you display all validation messages in one control?

1040


What is state management in asp.net with example?

1010


Explain form level validation and field level validation?

1072


What is .net framework and what are the main components of it?

882


What is server side session management?

982


What does mvc represent in asp.net? : asp.net mvc

1285


How to unit test Web API?

1253


What is session in http request?

1068


Explain the basic functionality of garbage collector?

1040


Explain the namespace classes used in asp.net mvc? : asp.net mvc

1043


Is global asax mandatory?

1040


Can we use MSSql as backend in asp.net...if yes then How.?

1087


How do you hide the columns?

1099


Explain the main function of url routing system in asp.net mvc? : asp.net mvc

1070