Asp – UpdatePanel in repeater overwrites controls underneath it

asp.netasp.net-ajaxupdatepanel

I have a Repeater with an ASP.NET AJAX 1.0 UpdatePanel inside it. There are buttons outside of the UpdatePanel but still in the repeater. When a section inside the UpdatePanel appears (it's a hidden Panel control that appears when user answers a question a certain way), the buttons at the bottom disappear.

Here is an illustration.

[REPEATER]
  [UPDATEPANEL]
     [QUESTION]   <-- when user says yes, Panel appears
     [PANEL]
  [/UPDATEPANEL]
  [TABLE]         <-- This table is no longer visible.
     [Button]
  [/TABLE]
[/REPEATER]

If I move the table to the top of the page, the content does not disappear, so I suspect it is a style issue, where the controls are actually there, but are underneath the content of the UpdatePanel. I've tried adding a <br clear="all"/> to just before the table, to no avail.

Any idea how I might fix this?

Edit: I had an errant missing closing tag that caused the UpdatePanel to extend further than it should've, so it was hiding my control. Using the Firefox plugins helped identify this.

Best Answer

My suggestion is to use Firefox and the Web Developer toolbar to do a View Generated Source after the update has occurred or inspect the elements with Firebug. If the table html is still on the page, then it could be either a style issue or an issue with malformed HTML in the panel causing the table not to render properly. If the table html is missing, then it is being removed from the DOM (or overwritten) by the AJAX callback. You might be able to use Firebug to debug the actual AJAX callback as well to see what and when things are actually being replaced.

Posting the generated HTML before and after the update in your question would also be helpful if you still can't figure things out and want more input.

Related Topic