母版页中不能动态添加tabpanel控件

同样的代码在普通页面中可以 在母版页中不行

     <div>

        <asp:ScriptManager ID="ScriptManager1" runat="server"> 
        </asp:ScriptManager>    
        <cc1:TabContainer ID="TabContainer1" runat="server" Height="500px" Width="100%" enableTabScroll="True" ActiveTabIndex="0">
           <cc1:TabPanel runat="server" HeaderText="我的工作台"  closable="False" ID="TabPanel1"  TabIndex="0">
                <ContentTemplate>
                    <script type="text/javascript">
                        TabPanel1.add({
                                        title: "web1",
                                        closable: true,
                                        html: "<h1>this is the second panel!</h1>"
                                    }
                                ).show(););
                        //function add() {
                        //    var tabs = $find("TabContainer1");
                        //    var tabPanel = tabs.TabPanel;
                        //    tabPanel.add
                        //    (
                        //        {
                        //            title: "web1",
                        //            closable: true,
                        //            html: "<h1>this is the second panel!</h1>"
                        //        }
                        //    ).show();
                        //}
                    </script> 
                    <input type="button" onclick="TabPanel1.add();" value="S01-1"/>
                </ContentTemplate>

            </cc1:TabPanel>
            <cc1:TabPanel runat="server" HeaderText="移出这个" closable="true" ID="tabRemove"> 
            </cc1:TabPanel>

        </cc1:TabContainer>

    </div>