我在选项卡容器中使用下拉扩展器,并且在页面加载时总是展开。它仅在文本框中单击后才会崩溃。它在标签容器的外部工作正常,并且仅在最新的浏览器中才会发生。Ajax下拉扩展器始终在页面加载时展开Ajax选项卡控件中的关联面板
如何在每次页面加载时折叠下拉扩展器? 我需要在页面加载事件中手动折叠它?
请告诉我我错了什么,它怎么能在代码后面或javascript崩溃?
我使用的.Net 2.0 Ajax的扩展与VS 2005
下面是我的代码。
<ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0">
<ajaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="TabPanel1">
<ContentTemplate>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<ajaxToolkit:DropDownExtender ID="DropDownExtender1" DropDownControlID="ListBox1" runat="server"
TargetControlID="TextBox1">
</ajaxToolkit:DropDownExtender>
<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">
<asp:ListBox ID="ListBox1" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
</asp:ListBox></asp:Panel>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</ContentTemplate>
</ajaxToolkit:TabPanel>
<ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">
</ajaxToolkit:TabPanel>
<ajaxToolkit:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3">
</ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<ajaxToolkit:DropDownExtender ID="DropDownExtender2" DropDownControlID="ListBox2" runat="server" TargetControlID="TextBox2">
</ajaxToolkit:DropDownExtender>
<asp:Panel ID="Panel2" runat="server" Height="50px" Width="125px">
<asp:ListBox ID="ListBox2" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
</asp:ListBox></asp:Panel>