Possible bug in ASP.net UpdatePanel control?
- by Ben Robinson
I have come across what seems to be an annoying bug with asp.net UpdatePanels in 2 seperate projects. If you have some kind of autopostback enabled control that can cause all of the controls in the update panel to have visible=false set, resulting in an empty update panel.
When you change the autopostback control back to the postion that would re enable all of the controls in the update panel, it simply does not make a call back to the server and the update panel does not update.
If you do anything else that makes a call back on the same page, then the update panel contents magically appear. It is as if asp.net has decided the update panel is empty so there is no point maikng a callback, even though making the call back would fill the updatepanel with content.
The only way round this is to add a style of display:none to the controls instead of setting visible=false property.
Then it works fine.
Has anyone else encountered this problem? Is it a bug as i suspect or is it likely i am doing soemthing wrong? I haven't got time to post example code at the moment as the code i am using is too wrapped up in other unrealted things, if people think it would help i will create a simple example and post it when I get time.