大家好,我有一个webform,它在选项卡的内容teplte中使用了ajax标签我把用户控件放在这里是一个例子
<ajaxtoolkit:tabcontainer id="StyledTabContainer" runat="server" activetabindex="0"
width="600px" cssclass="MyTabStyle">
<!-- Overview Tab -->
<ajaxToolkit:TabPanel HeaderText="Overview" CssClass="none" runat="server" ID="TabPanel1" OnClientClick="PanelClickHide">
<ContentTemplate>
<div>
<h3>Overview</h3>
<p>
<over:Overview id="overview" runat="server" />
</p>
</div>
</ContentTemplate>
</ajaxToolkit:TabPanel>
<!-- Pre-test Tab -->
<ajaxToolkit:TabPanel HeaderText="Pre-test" runat="server" ID="TabPanel2" OnClientClick="PanelClickHide">
<ContentTemplate>
<h3>Pre-test</h3>
<br />
<p>
<pre:PreTest id="pretest" runat="server" />
</p>
</ContentTemplate>
</ajaxToolkit:TabPanel>
<!-- Webcast -->
<ajaxToolkit:TabPanel HeaderText="Webcast" runat="server" ID="TabPanel3" OnClientClick="PanelClick">
<ContentTemplate>
<h3>Webcast</h3>
<br />
<p id="pvisible" style="display:none">
<vid:Video id="vid1" runat="server"/>
</p>
</ContentTemplate>
</ajaxToolkit:TabPanel>
<!-- Post-test Tab -->
<ajaxToolkit:TabPanel HeaderText="Post-test" runat="server" ID="TabPanel4" OnClientClick="PanelClickHide">
<ContentTemplate>
<h3>Post-Test</h3>
<br />
<p>
<post:Post id="post" runat="server" />
</p>
</ContentTemplate>
</ajaxToolkit:TabPanel>
</ajaxtoolkit:tabcontainer>
在用户控件中我有一个提交按钮。
在ajax标签所在的webform上的我控制在这里打开或关闭哪个标签是示例
if (status.Part1StartDate != null)
{
StyledTabContainer.ActiveTabIndex = 1;
TabPanel1.Enabled = false;
TabPanel2.Enabled = true;
TabPanel3.Enabled = false;
TabPanel4.Enabled = false;
TabPanel5.Enabled = false;
TabPanel6.Enabled = false;
}
if (status.Part1Done == true)
{
StyledTabContainer.ActiveTabIndex = 2;
TabPanel1.Enabled = false;
TabPanel2.Enabled = false;
TabPanel3.Enabled = true;
TabPanel4.Enabled = false;
TabPanel5.Enabled = false;
TabPanel6.Enabled = false;
}
每当我点击内容模板中的用户控件内的按钮时,我会收到此错误。
Microsoft JScript runtime error: Sys.InvalidOperationException:
Handler was not added through the Sys.UI.DomEvent.addHandler method.
请帮助.....
谢谢