TabContainer cannot have children of type.....  

Posted in

Recently, I encountered the problem quite similiar to the one above.....

TabContainer cannot have children of type
'System.Web.UI.WebControls.Repeater'

to be precise...

I googled quite a bit for this error, but could not find much about it.. No wonders.. It was a careless mistake that I had made. Here is the control that caused this issue....

<cc1:tabcontainer id="tabToolbox" runat="server">
<cc1:tabpanel id="pnl" headertext="Most Popular">
<contenttemplate>
<asp:repeater id="rptMostPopular" runat="server">
<itemtemplate>
<asp:linkbutton id="lnkPopular" runat="server" text=""></asp:linkbutton>
</itemtemplate>
</asp:repeater>
</contenttemplate>
</cc1:tabpanel>
<cc1:tabpanel id="pnl2" headertext="Most Viewed">
<contenttemplate>
<asp:repeater id="rptMostViewed" runat="server">
<itemtemplate>
<asp:linkbutton id="lnkPopular" runat="server" text="">&jt;/asp:linkbutton>
</itemtemplate>
</asp:repeater>
</contenttemplate>
</cc1:tabpanel>
<cc1:tabpanel id="pnl3" headertext="Most Emailed">
<contenttemplate>
<asp:repeater id="rptMostEmailed" runat="server">
<itemtemplate>
<asp:linkbutton id="lnkPopular" runat="server" text=""></asp:linkbutton>
</itemtemplate>
</asp:repeater>
</contenttemplate>
</cc1:tabpanel>
</cc1:tabcontainer>

Well...... A very simple reason for getting this error, even on the designer and also at runtime..
I FORGOT THE TAG "RUNAT=SERVER" WHILE DESCRIBING THE TAB PANELS AND therefore could not get the tab-panels to be server side...

This is what raised the issue.

A simple addition of RUNAT=SERVER solves the issue...


Hope this would help someone in need... :)

--Ashutosh

This entry was posted on Monday, December 8, 2008 at Monday, December 08, 2008 and is filed under . You can follow any responses to this entry through the comments feed .

14 comments

Thanks - solved my problem

12:07

Happy to know that it helped. :)

13:51
Anonymous  

Ah, I missed it on one panel too, thanks

04:39
Anonymous  

thanks a lot. you saved me for a lot of headache.

01:27
Anonymous  

Your post saved me some digging ! Thanks

00:08

thanks, woked for me. :)

02:59
Anonymous  

Yes it worked for me too. Thanks!

14:03
Anonymous  

Thanks spent a few hours digging until I came accross your blog. Thanks so much! -Erick

04:53
Anonymous  

Your not the only one to make this mistake. Thanks for posting it. Solved my problem too!

07:29

ridiculous error message - thanks though

16:02

Yeah typing too fast, and forgot those 'important' properties. Nice post - thanks!

20:54
Anonymous  

Thanks. it saved my two hours :)

00:07
Anonymous  

thanks .... you helped me indeed :)

17:40
Anonymous  

No matter how many times I implement a tab control I ALWAYS forget the panels themselves require those parameters.

Many thanks!

22:17

Post a Comment