我有一个带有两个选项卡的 Ajaxtoolkit Tabcontainer,启用的第二个选项卡为 False。我在第二个选项卡中放置了一个 Combobox AjaxToolikit 控件。但是当仅在 IE 浏览器中对服务器进行回发时,我收到以下错误。但在 Firefox 中我没有问题,一切正常。怎么了?
这是我的代码:
<ul>
<li>
<asp:ImageButton ID="BtnNew" CausesValidation="false" runat="server" ImageUrl="~/CssImages/new_document.png"
ToolTip="New" Width="20px" OnClick="BtnNew_Click" /></li>
</ul>
<cc1:TabContainer ID="TabContainer1" runat="server">
<cc1:TabPanel runat="server" ID="Tab1" HeaderText="xx">
<ContentTemplate>
xx
</ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel runat="server" ID="TabPanel1" HeaderText="yy" Enabled="false">
<ContentTemplate>
dsds <cc1:ComboBox ID="ComboBox1" runat="server">
<asp:ListItem>loblob</asp:ListItem>
</cc1:ComboBox>
</ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer>
错误:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
AjaxControlToolkit.ComboBox.LoadPostData(String postDataKey, NameValueCollection postCollection) +168
AjaxControlToolkit.ComboBox.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +57
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +690
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743