Page Load fired 3 times Web user control is embedded in a custom control

T

Thomas Ekegren

Hi,

I have built a custom control that build a table with 3 cells in it. The
custom control is designed to add all child controls to cell#2, which it
does like it is supposed to.
However if I add a web user control inside the custom control, the page_load
event of the web user control is fired three times! Does anybody know how to
avoid that the page_load event is fired three times?

code example:
....
<Custom:CustomTable id="ct1" runat="server" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td><asp:panel id="pnl" runat="server">
...
</asp:panel>
</td>
</tr>
</Custom:CustomTable>

.... HERE THE PAGE_LOAD EVENT OF THE WEB USER CONTROL
<CustomControls:GalleryThumbs> IS FIRED THREE TIMES
<Custom:CustomTable id="ct1" runat="server" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<CustomControls:GalleryThumbs runat="server"
id="test"></CustomControls:GalleryThumbs>
</td>
</tr>
</table>
</td>
</tr>
</Custom:CustomTable>

Any help would be highly appreciated!

/Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,829
Latest member
PIXThurman

Latest Threads

Top