0

Hi...
I have Question For maintain exceptions in ASP.net...
I am use ASP.net 2.0 with C# as code behind file...
My Question is
we think in some web site some exception was Not handle...There for There is the Exception occur...
In that time,what,when that exception occur..want some globle page load,like sorry program cant run Like that...How I do that...

4
Contributors
7
Replies
8
Views
7 Years
Discussion Span
Last Post by rohand
0

you can use try..catch block to handle the exception. in the catch() block , redirect on the page in which you have defined above message. or handle the exception globally.

0

OK
I can do that...
But rohandI can't guarantee ,what i was catch all the exceptions...If some exception.i was not handle, how I handle that

0

wot do u mean you can not handle exception..

you can handle exception the way you want, in fact you can create your own custom exceptions..

0

Friend.
Exceptions are occur at the run time...when different situations...some times Programmer, Who made the software did not catch the exception..becouse he cant check all the situations..In that time how i face this... And
What is the custom exception...

0

The best option is to configure your webconfig file. set customErrors mode to "ON"
and defaultRedirect="customeErrorPagelink"

0

I believe mono_jit23 suggestion is good to handle the exception. Also you can handle application level errors on Global.asax file in application_error event..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.