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?

Answers were Sorted based on User's Feedback



How can u handle Exceptions in Asp.Net?..

Answer / aadil

In ASP.NET, we have three types of Error Handling.
1. Structured Level Error Handling (try..catch..finally
block)
2. Page Level Error Handline
3. Application Level Error Handling.

Is This Answer Correct ?    3 Yes 0 No

How can u handle Exceptions in Asp.Net?..

Answer / 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

How can u handle Exceptions in Asp.Net?..

Answer / guest

using system.exceptions namespace

Try
Piece of code ..
Catch objError as Exceptions
display objError.message
Finally

Is This Answer Correct ?    0 Yes 0 No

How can u handle Exceptions in Asp.Net?..

Answer / senthil kumar

try
{
//set of code
}
catch(Exception1 e)
{
//error display
}
catch(Exception2 e)
{
//error display
}
finally
{
//compulsory execution will be done here
}

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

HI, I have a very important query in mind. Please help me regarding this. I don't have any real time exp in .net. But I have a knowledge it .net. I got an offer from an MNC company as a software developer has I had kept 2 years of fake exp. Even though for this job I had worked hard to crack interview for more then a year. So, I would like to know how difficult it will be for working in real time as I don't have real time exp. Please tell me as soon as possible bcoz I need to join by next month. Can i sustain over there for a longer time or not. And also let me know how to work pressure will be over there. Please help me regarding this. I'm getting tension thinking about it. Thank you.

1 Answers   CTS,


what is COM Object in Dot net?

6 Answers   CTS,


Write a code for "RequiredFieldValidator" in java script

5 Answers   Wipro,


What is asp.net web application?

0 Answers  


Can any one explain with the example how to capture the application error in Aplication_Error() method?

1 Answers   Infosys,


can we transfer data from one page to another page using viewstate if so how?if not y?

1 Answers   Patni,


Tell About Web.config ?

2 Answers   Keane India Ltd,


can we pass coditions in swtich case?

3 Answers  


Can we use http handlers to upload a file in asp.net?

2 Answers  


What is the Custom Error in ASP.NET?

2 Answers   ABB, IBM, Infosys, Tech Mahindra,


How would ASP and ASP.NET applications run at the same time on the same server?

0 Answers   Satyam,


What is viewstate information stored?

0 Answers  


Categories