PDA

View Full Version : Master page issue Coolite + UpdatePanel



mthakershi
Apr 02, 2008, 6:40 PM
I have a master page with ASP.NET. It has header, content and footer sections. I use content place holder in the content section and put child pages in that. Header and footer content are directly inside the master page. There are two update panels (one surrounding header and one for footer) in the master page.

I use Coolite controls in my content pages. I have a tab control inside an update panel here. For any postbacks fired from the master page, the tab control reproduces itself. Basically, any Coolite container reproduces itself.

Any idea why does this happen?

Thank you.

Malay

geoffrey.mcgill
Apr 02, 2008, 7:35 PM
ya, this is an issue with how we're building the client-side initialization <script>. Basically all the initialization script gets sent back to the browser each time the UpdatePanels refresh their contents. This is also going to be a tricky one to solve [for us].

At the moment, this "cloning" of the controls is going to occur if you wrap the coolite controls with an UpdatePanel. If the UpdatePanel is within the <Content> container of the coolite control, then things should work fine.

Example


<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<cool:Window ID="Window1" runat="server">
<Content>
Problem!
</Content>
</cool:Window>
</ContentTemplate>
</asp:UpdatePanel>


<cool:Window ID="Window2" runat="server">
<Content>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
No Problem!
</ContentTemplate>
</asp:UpdatePanel>
</Content>
</cool:Window>

mthakershi
Apr 02, 2008, 10:39 PM
I think it still doesn't take care of nested scenario.

I tried rolling my UpdatePanel inside a cool:panel but when postback is being fired from my master page, the cool:tabpanel inside my content page gets cloned.

Thank you.

geoffrey.mcgill
Apr 02, 2008, 10:57 PM
Can you provide a code sample demonstrate how your controls are nested?

mthakershi
Apr 03, 2008, 2:20 AM
<Masterpage>

<UpdatePanel Header>
Header content
</UpdatePanel Header>

<Content Place Hoder>
//now inside the page
<Cool:Panel>
<UpdatePanel Content>
Page content
//Here I have Cool:TabPanel
</UpdatePanel Content>
</Cool:Panel>
</Content Place Hoder>

<UpdatePanel Footer>
Footer content
</UpdatePanel Footer>

</Masterpage>

When I perform an event in header, it clones the Cool:TabPanel. If I have any popup cool:window inside my content they stop working the way they are supposed to (like they won't close by X).

Thank you.</p>