title: Handler was not added through the Sys.UI.DomEvent.addHandler method
body: <p>I am experiencing a Javascript runtime error, when I click a save button on my web form, that appears to be related to an Ajax TabPanel.  The error message is “Handler was not added through the Sys.UI.DomEvent.addHandler method”.  The reason I say I believe it is related to the TabPanel is because the JavaScript function that is throwing the error is “Sys$UI$DomEvent$_removeHandler(element, eventName, handler)” and the some of the properties of the parameter “element” reference my TabPanel.  It’s strange that I am seeing this error now because the only thing I really changed was upgrading to the latest AjaxControlToolkit (Version 15.1.1.100).  Previously I was not getting this error.  My entire form is wrapped in a single UpdatePanel and has always been this way.  I also have two ModalPopupExtenders on this page which I have heard can cause this error if the OK or Cancel controls for the Popup are inside the update panel which they are, but have never caused an issue previously.</p>
  
  <p>The only thing I found in my web searching that was not specifically related to ModalPopupExtenders that I tried was setting the ScriptManager ScriptMode tag to "Release"</p>
  
  <p>The markup for this webform is pretty long so I am only posting that which is specific to the TabContainer and TabPanel.  Please forgive the inline CSS.</p>
  
  <p>Any thoughts or suggestions would be greatly appreciated!</p>
  
  <p><strong>UPDATE (5/28/2015)</strong></p>
  
  <p>I decided to roll back the AjaxControlToolkit to the previous version I was using (version 4.1.7.1213) and the error message / problem is no longer happening.  I would like to be able to use the latest Ajax library but need to figure out how to fix the error first.</p>
  
  <p>Also, I found in another search this morning that this may be a known bug in the version of the toolkit I mentioned as reference here <a href="http://ajaxcontroltoolkit.codeplex.com/workitem/27775" rel="nofollow">Tab Container Bug</a>.  It appears that a fix is already in place for the upcoming version 15.3.  You have to read through some of the comments to see where others have seen the error I am referring to above.  I guess I will stick with the old version until I know for sure this is fixed!</p>
  
  <pre><code>    &lt;asp:Panel ID="CollapsiblePNL" class="collapsePanel" runat="server" style="height:0px; padding:5px 5px 5px 5px"&gt;    
      &lt;ajaxToolkit:TabContainer ID="TabContainer1" runat="server" Width="100%"  AutoPostBack="True" OnActiveTabChanged="TabContainer1_ActiveTabChanged" ActiveTabIndex="1" &gt;
  
          &lt;ajaxToolkit:TabPanel ID="AddFilesTabPanel" runat="server" HeaderText="Add Files"&gt;
              &lt;ContentTemplate&gt;
                  &lt;div&gt;
                      &lt;ajaxToolkit:AjaxFileUpload ID="AjaxFileUpload1" runat="server" OnUploadComplete="AjaxFileUpload1_UploadComplete" Width="100%" OnClientUploadCompleteAll="emptyMyAjaxFileUpload" MaximumNumberOfFiles="0" AllowedFileTypes="" OnUploadCompleteAll="AjaxFileUpload1_UploadCompleteAll" OnUploadStart="AjaxFileUpload1_UploadStart"  /&gt;
                  &lt;/div&gt;
              &lt;/ContentTemplate&gt;
          &lt;/ajaxToolkit:TabPanel&gt;
  
         &lt;ajaxToolkit:TabPanel ID="AttachedFilesTabPanel" runat="server" HeaderText="Attached Files"&gt;
              &lt;ContentTemplate&gt;
                  &lt;div style="float: left; clear:left; vertical-align: middle;"&gt;
                      &lt;asp:Label ID="Label2" runat="server" Text="Current Attached Files" Font-Bold="True" Font-Size="Large"&gt;&lt;/asp:Label&gt;
                  &lt;/div&gt;
                  &lt;div style="float: left; clear:left; vertical-align: middle;"&gt;
                      &lt;asp:ListBox ID="ListBox1" runat="server" Rows="10" Width="400px"&gt;&lt;/asp:ListBox&gt;
                  &lt;/div&gt;
                  &lt;div style="float:left"&gt;
                      &lt;div style="float: left; vertical-align: middle; margin: 5px 5px 5px 5px"&gt;
                          &lt;asp:Button ID="RemoveFileBTN" runat="server" Text="Remove" OnClientClick="return confirmation();" OnClick="RemoveFileBTN_Click" Width="99px"/&gt;  
                      &lt;/div&gt;
                      &lt;div style="float: left; clear:left; vertical-align: middle;  margin: 5px 5px 5px 5px"&gt;
                          &lt;asp:Button ID="RemoveAllFilesBTN" runat="server" Text="Remove All"  OnClientClick="return confirmation();" OnClick="RemoveAllFilesBTN_Click" Width="99px" /&gt;  
                      &lt;/div&gt;
                      &lt;div style="float: left; clear:left; vertical-align: middle; margin: 5px 5px 5px 5px"&gt;
                          &lt;asp:Button ID="OpenBTN" runat="server" Text="Open" OnClick="OpenBTN_Click" Width="99px"/&gt;  
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/ContentTemplate&gt;
          &lt;/ajaxToolkit:TabPanel&gt;
      &lt;/ajaxToolkit:TabContainer&gt;
  &lt;/asp:Panel&gt;
  </code></pre>