Wednesday, March 21, 2012

TabContainer inside UpdatePanel

Hi i have a TabContainer inside my UpdatePanel and when i try and load the tabcontainer inside the update panel the formatting disappears. The Tabcontainer still works i can move between the tabs but the background behind the tabs is not there only the header text for the tab and the content of the tab itself no background for the body. If i take out the update panel then the tab container works fine.

The heirachy of my page is

Main form -> Usercontrol -> UpdatePanel -> TabContainer -> Tab Panels

Any help on this would be great as i have been searching for days now and cannot find an answer.

This seems to be a bug (as far as I can see on the codeplex site) and will be corrected in the next release. The problem is the the webresource.axd is not loaded when tabcontainer is inside an updatepanel. As a workaround what u can do is place a tabcontainer outside the updatepanel (I have placed it in my masterpage) and use a div styled with display:none surrounding the tabcontainer to make invisisble.

Like so:

In my masterpage

....

<div style="display:none;">

<ajax:TabContainer runat="server"></ajax:TabContainer>

</div>

</html>


I forgot to say that this makes your actual tabcontainer (the one inside an updatepanel) display the formatting correctly...

Hope it helpYes
Thanks heaps jole. That has worked perfectly. I have been struggling on this issue for days so very relieved

I am having the same issue and I also tried your solution. It did not work for me. I tried adding another TabContainer to my page but that did not solve the problem. I was hoping you had another solution :) My problem actually causes a javascript error; "Error: this.get_element().style' is null or not an object". Any help or ideas would be greatly appreciated.

No comments:

Post a Comment