Thanks for reply. I'm already using Page_Error but it doesnt actually
handle the exception. After it is called the page life cycle breaks,
the page is not rendered and you see the error page. The problem is
within exceptions occured in oninit, page_load and so on events
happened in child controls because i cant wrape it with try catch. It's
possible to if the controls are loaded dynamically but if they are
placed on the page i dont know the solution.
Any ideas are welcome. :)
Karl Seguin [MVP] писал(а):
I think ur best bet will be to look into the Page_Error event of the user
control itself. It's like Page_Load, but fires when an exception occurs.
I'm not sure what you are able to do, but you might potentially be able to
do:
sub Page_Error(..)
Response.Write("Sorry, the module could not be loaded")
end sub
--
http://www.openmymind.net/
http://www.codebetter.com/
<ra****************@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Hi all. I'd like to replace user control( if it loads with exception
or fires exception during execution) with a friendly message. This
strategy is used in dotnetnuke but there they load controls in code but
i have to add them manually to aspx pages(historically). Can i somehow
handle it? For instance on render event?