Hi,
I'm trying to us a tabcontainer inside a updatepanel and if I use postbacks to change values inside the update panel I get the following error:
Uncaught Sys.InvalidOperationException: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method. ScriptResource.axd:5036
Here my code
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub foo_Click(sender As Object, e As System.EventArgs)
If ViewState("buttonState") Then
ViewState("buttonState") = False
tabCommon.Enabled = False
label.Text = "false"
Else
ViewState("buttonState") = True
tabCommon.Enabled = True
label.Text = "true"
End If
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="server">
</ajaxToolkit:ToolkitScriptManager>
<asp:UpdatePanel runat="server" ID="upEditor">
<ContentTemplate>
<asp:Button runat="server" ID="foo" OnClick="foo_Click" />
<asp:Label runat="server" ID="label" />
<ajaxToolkit:TabContainer runat="server" ID="tabContainer">
<ajaxToolkit:TabPanel runat="server" HeaderText="Allgemein" ID="tabCommon">
<ContentTemplate>
</ContentTemplate>
</ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
If you click the button 3 times the error is thrown.
I finally found a solution after nearly 2 days of research.
The September 2011 Release does not seam to have the bug.
With the November 2011 Release it doesn't work.
would be nice if you can fix this in future releases.
thaks
I'm trying to us a tabcontainer inside a updatepanel and if I use postbacks to change values inside the update panel I get the following error:
Uncaught Sys.InvalidOperationException: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method. ScriptResource.axd:5036
Here my code
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub foo_Click(sender As Object, e As System.EventArgs)
If ViewState("buttonState") Then
ViewState("buttonState") = False
tabCommon.Enabled = False
label.Text = "false"
Else
ViewState("buttonState") = True
tabCommon.Enabled = True
label.Text = "true"
End If
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="server">
</ajaxToolkit:ToolkitScriptManager>
<asp:UpdatePanel runat="server" ID="upEditor">
<ContentTemplate>
<asp:Button runat="server" ID="foo" OnClick="foo_Click" />
<asp:Label runat="server" ID="label" />
<ajaxToolkit:TabContainer runat="server" ID="tabContainer">
<ajaxToolkit:TabPanel runat="server" HeaderText="Allgemein" ID="tabCommon">
<ContentTemplate>
</ContentTemplate>
</ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
If you click the button 3 times the error is thrown.
I finally found a solution after nearly 2 days of research.
The September 2011 Release does not seam to have the bug.
With the November 2011 Release it doesn't work.
would be nice if you can fix this in future releases.
thaks