Tutorial :UpdatePanel not refreshing display



Question:

I have an UpdatePanel inside of a custom control, and within that UpdatePanel are two placeholders. One is initially set Visible = false, the other true. Inside the visible one I have an ImageButton that toggles the visibility of the placeholders.

I'm using this control on two different pages in my site. On the home page it works as expected, on the other page clicking the button triggers the event (I can put a breakpoint in and it will trigger), but the screen doesn't update. None of the other buttons in the updatepanel seem to work either.

Both pages share the same master page, which contains a scriptmanager.

Any Ideas? I'm afraid I can't post code because of client agreements, but I've tried to outline the situation as best as I can.


Solution:1

Whenever I have one page that works perfectly and another that has the same functionality but doesn't, it usually boils down to a stupid little thing.

You need to take everything out of the page that isn't currently working, then start building it back up. Initially, just start with your update panel, placeholders, and button. If that doesn't work, refer to the other page and look at it line by line until everything matches and starts working.

From there, just build your page back up until it either fails or your done.


Solution:2

I got it working, but I'm not sure how. On both pages, the custom control was embedded in the HeaderTemplate of a repeater. On the broken page, removing it from the HeaderTemplate caused it to work as expected.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »