我正在尝试使用文本框和弹出控件扩展程序创建带有复选框的下拉列表,但每次运行时都会出现此错误:
错误:' Sys.Extended.UI'是null还是不是对象'。
我想尽可能简单但不确定我在这里缺少什么。这是代码:
<asp:TextBox ID="ddl_TextLog" runat="server" AutoPostBack="true" BackColor="#FFFFCC" Style="background-color: #FFCC66" Width="250px"></asp:TextBox>
<asp:PopupControlExtender ID="TextBox1_PopupControlExtenderLog" runat="server" Enabled="True" ExtenderControlID="" TargetControlID="ddl_TextLog" PopupControlID="pnl_Log" OffsetY="22"></asp:PopupControlExtender>
<asp:Panel ID="pnl_Log" runat="server" Height="180px" Width="250px" BorderStyle="Solid" BorderWidth="2px" Direction="LeftToRight" ScrollBars="Auto" BackColor="#FFFFCC" Style="display: none">
<asp:CheckBoxList ID="CheckBoxList_Log" runat="server" DataSourceID="SqlDataSource_Log" DataTextField="MDE" DataValueField="MDE" AutoPostBack="True" OnSelectedIndexChanged="CheckBoxList_Log_SelectedIndexChanged"></asp:CheckBoxList>
<asp:SqlDataSource ID="SqlDataSource_Log" runat="server" ConnectionString="<%$ ConnectionStrings:DCR-DWH-MS-01-DA2 %>" SelectCommand=" SELECT DISTINCT MDE FROM myTable ORDER BY MDE ASC"></asp:SqlDataSource>
</asp:Panel>
答案 0 :(得分:0)
我必须使用它并解决了我的问题:
<ajaxToolkit:ToolkitScriptManager runat="server" ID="ToolkitScriptManager1" />