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

which one is more flexibility and reliability and durability asp.net (VS)php which one is best and which one we do nice to create dynamic websites

2163


In asp.net, how can you validate drop down box?

1175


How will you load dynamic assembly?

1004


Explain the different types of assemblies?

964


What are the types of caching in asp.net?

1084


Securitywise What are the Enhancements in 2.0?

1940


When we use cookie less session? Explain its working?

1035


How to implement globalization and localization in the use interface in .net.

1015


how to retrieve property settings from xml .config file.

997


How will you do Redo and Undo in a TextControl?

1190


How you can access the properties and controls of master pages from content pages?

956


How is mvc different from asp.net? : Asp.Net MVC

1060


How to display validation messages in one control?

991


Explain global assembly cache.

1044


What is css in asp.net?

1076