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><aspanel id="pnl" runat="server">
...
</aspanel>
</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
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><aspanel id="pnl" runat="server">
...
</aspanel>
</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