views:

307

answers:

1

Hi all

I've got just caught with strange behavior of AJAX update panel. The first think made me embarrassed is that I have noticed that when I throw exception during async postback, it is swallowed by enviroment.

Since it's first time when I faced to such issue, I started to make experiments - trying either to throw different types of exceptions, or to throw same exceptions outside updatePanel (e.g at Page_Init event). The conclusion is that when exception is thrown within async postback, the environment swallows it, and page renders as if nothing happened (it is the inacceptible point ). But when I throw the exception within normal page life-cycle, exception forwards in usual way and page fails as expected (I hope to be right with my deductions)

The question is what should I do to enable exception throwing

(BTW, while I'd been writing this message, I was noticed that due to business-logic changes there is no longer need to throw above-mentioned exception, but I am interested anyway why it happens)

The second issue with updatePanel is that when I set it {up.Visible=false;} at Page_Load, then at the some method set it {up.Visible=true; up.Update() } - it still unrenderred. I have set breakpoints at both places; .visible is set to true when page renders, but anyway it still be invisible.I do not see any obvious reason why.

Thanks.

A: 

Excptions are thrown. For example, if you open FireFox, go to Help and Error Console, and work with your page there, you will see the exceptions being thrown.

Chrome has a Javascript Console also. You have other various plugins for development too like:

Charles

Web Developer plugin for fire fox

FireBug plugin for fire Fox

Internet Explorer Developer Toolbar

Internet Explorer 8 integrated Developer Tools

Http Watch - http://www.httpwatch.com/download/

Hope this helps:

Andrew

REA_ANDREW