Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

Last post 10-07-2009 12:48 PM by GenXisT. 26 replies.

Sort Posts:

  • Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    12-19-2006, 7:39 AM
    • Member
      367 point Member
    • andymarks
    • Member since 05-22-2006, 2:32 PM
    • England
    • Posts 83

    I have just upgraded our web applications to RC1 (please don't change the namespaces again microsoft!), and are getting the following error on one of our pages:


    A Runtime Error has occurred.
    Do you wish to Debug?

    Line: 3088
    Error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.

    Has anyone elst seen this error?

     

    Filed under:
  • Re: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    12-21-2006, 12:17 AM
    • Member
      71 point Member
    • coospaa
    • Member since 07-18-2006, 8:45 AM
    • Posts 20
    I'm running into the same error. I'm migrating from Beta 2 to RC1, no such error in Beta 2. Any clues?
    Filed under:
  • Re: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    12-21-2006, 1:33 AM
    • Member
      71 point Member
    • coospaa
    • Member since 07-18-2006, 8:45 AM
    • Posts 20

    A bit more details:

    I'm using a ModalPopup with a button on it. Clicking on this button will redirect to another page (see below). It works fine in Beta2.

    protected void btnYes_OnClick(object sender, EventArgs e)
    {
         Response.Redirect("PageB.aspx");
    }
    I suspect it's because I use "Response.Redirect"Confused
    If I ignore the runtime error, everything works as expected and the page get redirected. Thus my interim solution is to add this javascript:
    function window.onerror()    {        return true;    }
    I know it's a bad practice.. but... can anyone help with this?
    Thanks in advance!

  • Re: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    12-21-2006, 4:15 AM
    • Member
      367 point Member
    • andymarks
    • Member since 05-22-2006, 2:32 PM
    • England
    • Posts 83

    My problem also includes the ModalPopup and page redirect. 

    The problem occurs with my application when a modalPopup is shown, dismissed and then the page gets redirected to another location.

     This is really annoying.... Crying

    Andy.

     

  • Re: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    12-22-2006, 6:59 AM
    • Member
      13 point Member
    • BennyXNO
    • Member since 07-05-2002, 9:08 AM
    • Posts 7
    Same problem here with the ModalPopup, but i don't redirect, but have serverside buttons.
  • Re: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    01-08-2007, 10:47 AM
    • Member
      367 point Member
    • andymarks
    • Member since 05-22-2006, 2:32 PM
    • England
    • Posts 83

    Is there any resolve for this, I need to get our system working for a customer test soon....

     

    Andy.

     

  • Re: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    01-10-2007, 3:06 PM
    • Member
      4 point Member
    • morocco
    • Member since 01-10-2007, 12:21 AM
    • Posts 2

    I am getting a similar problem.

     I am using a usercontrol to host the following (this is pre-cleaning, it's a proof of concept). Popup extender is at the bottom.

    I am getting that JScript error when I try to navigate AWAY from the page.

    1    <asp:updatepanel updatemode="Conditional" id="ResourceGalleryUpdater" runat="server">
    2        <contenttemplate>
    3            <asp:Panel ID="ResourceGalleryPanel" runat="server" CssClass="GalleryPopup" style="display:none;">
    4                <asp:updatepanel updatemode="Always" id="InnerUpdater" runat="server">
    5                    <contenttemplate>
    6                        <asp:panel runat="server" id="AssetSelectPanel">
    7                            <div class="Page1LeftPanel">
    8                                <div id="FolderList">
    9                                    <div id="FolderListTitle" class="title">
    10                                       Folder List
    11                                   </div>
    12                                           <asp:treeview id="FolderTreeXP" runat="server" imageset="XPFileExplorer" nodeindent="15" onselectednodechanged="FolderTreeXP_SelectedNodeChanged">
    13                                               <parentnodestyle font-bold="False" />
    14                                               <hovernodestyle font-underline="True" forecolor="#6666AA" />
    15                                               <selectednodestyle backcolor="#B5B5B5" font-underline="False" horizontalpadding="0px"
    16                                                   verticalpadding="0px" />
    17                                               <nodestyle font-names="Tahoma" imageurl="resources/folder.png" font-size="8pt" forecolor="Black" horizontalpadding="2px"
    18                                                   nodespacing="0px" verticalpadding="2px" />
    19                                           </asp:treeview>
    20                               </div>
    21                           </div>
    22                           
    23                           <div style="height: 400px; width: 1px; float: right; background-color: #cccccc; margin: 0px auto 0px auto;"></div>
    24                           
    25                           <div class="Page1RightPanel">
    26                               <div id="FileList">
    27                                   <div id="FileListTitle" class="title">
    28                                       File List
    29                                   </div>
    30                                   <asp:updatepanel updatemode="Conditional" id="AssetUpdate" runat="server">
    31                                       <contenttemplate>
    32                                           <div id="FileListDiv" style="overflow:auto; height: 350px; padding: 2px;" >
    33                                               <asp:repeater onitemcommand="AssetItemCommand" id="AssetRepeater" runat="server" enableviewstate="false" >
    34                                                   <itemtemplate>
    35                                                       <asp:panel bordercolor="blue" id="AssetPanel" runat="server" height="108px" width="316px">
    36                                                           <table class="AssetTable" width="316px" cellpadding="0" cellspacing="0">
    37                                                               <tr>
    38                                                                   <td style="width:1px; overflow:auto;"><img alt="Left Border" src="Resources/AssetLeft.png" height="108px" width="1px" /></td>
    39                                                                   <td valign="middle" class='<%# GetAssetClassName(((BMW.CMS.Business.Asset) Container.DataItem).AssetGuid)%>' align="center" style="width: 120px;">
    40                                                                       <asp:imagebutton imagealign="AbsMiddle" commandname="Select" commandargument='<%# DataBinder.Eval( Container.DataItem, "AssetGuid" ) %>' runat="server" id="PreviewImage" ImageUrl='<%# "preview.ashx?h=96&w=96&vid=" + DataBinder.Eval(Container.DataItem, "CurrentFile.FileGuid") %>' />
    41                                                                   </td>
    42                                                                   <td class='<%# GetAssetClassName(((BMW.CMS.Business.Asset) Container.DataItem).AssetGuid)%>'>
    43                                                                       <asp:linkbutton runat="server" commandname="Select" commandargument='<%# DataBinder.Eval( Container.DataItem, "AssetGuid" ) %>' id="Name">
    44                                                                           <b><%# DataBinder.Eval(Container.DataItem, "Name") %></b>
    45                                                                       </asp:linkbutton>
    46                                                                       <br />
    47                                                                       <%# GetKB(((BMW.CMS.Business.Asset)Container.DataItem).CurrentFile.FileBytes.Length)%> KB <%# ((string)DataBinder.Eval(Container.DataItem, "AssetType.FileExtension")).ToUpper()%> File<br />
    48                                                                       <%# DataBinder.Eval(Container.DataItem, "CurrentFile.Dimensions")%><br />
    49                                                                       <%# DataBinder.Eval(Container.DataItem, "CurrentFile.Duration")%><br />
    50                                                                       Current Version Uploaded on <%# ((BMW.CMS.Business.Asset)Container.DataItem).CurrentFile.UploadDate.ToShortDateString()%><br />
    51                                                                   </td>
    52                                                                   <td align="right" style="width:2px; overflow:hidden;"><img alt="Right Border" src="Resources/AssetRight.png" height="108px" width="2px" /></td>
    53                                                               </tr>
    54                                                           </table>
    55                                                       </asp:panel>
    56                                                       <script type="text/javascript">
    57                                                           
    58                                                       </script>
    59                                                   </itemtemplate>
    60                                                   <separatortemplate>
    61                                                       <div style="height:2px;"></div>
    62                                                   </separatortemplate>
    63                                               </asp:repeater>
    64                                           </div>
    65                                       </contenttemplate>
    66                                   </asp:updatepanel>            
    67                               </div>
    68                           </div>
    69                       </asp:panel>
    70                       
    71                       
    72                       
    73                       <asp:panel runat="server" id="AssetPropertiesPanel" visible="false">
    74                           <div style="height: 400px; width: 49%; float: left;">
    75                               <div id="Preview">
    76                                   <div id="PreviewTitle" class="title">
    77                                       Preview
    78                                   </div>
    79                                   <asp:updatepanel updatemode="Conditional" id="PreviewUpdate" runat="server">
    80                                       <contenttemplate>
    81                                           <table cellpadding="0" cellspacing="0" style="height: 390px; width: 300px; margin: auto;">
    82                                               <tr>
    83                                                   <td valign="middle" align="center" style="vertical-align: middle;">
    84                                                       <asp:Image id="PreviewImage" visible="false" runat="server" cssclass="PreviewImage" />
    85                                                       <asp:panel id="PreviewMessage" cssclass="InfoMessage" runat="server">
    86                                                           <b>Asset Preview.</b><br />
    87                                                           Select an asset to preview.
    88                                                       </asp:panel>
    89                                                   </td>
    90                                               </tr>
    91                                           </table>
    92                                       </contenttemplate>
    93                                   </asp:updatepanel>            
    94                               </div>
    95                           </div>
    96                           <div style="height: 400px; width: 49%; float: right;">
    97                               <div id="Properties">
    98                                   <div id="PropertiesTitle" class="title">
    99                                       Properties
    100                                  </div>
    101                                  <table style="background-color: #f8f8f8;" cellpadding="2px" cellspacing="0px" width="100%">
    102                                      <tr style="height: 20px; font-size: 12px; font-family:Arial;">
    103                                          <td style="vertical-align:middle;">Subscribe to asset:</td>
    104                                          <td>
    105                                          
    106                                          </td>
    107                                      </tr>
    108                                      <tr>
    109                                          <td style="vertical-align:middle;">Alternate Text:</td>
    110                                          <td>
    111                                              <asp:textbox id="AltText" runat="server"></asp:textbox>
    112                                          </td>
    113                                      </tr>
    114                                      <tr>
    115                                          <td style="vertical-align:middle;">Width:</td>
    116                                          <td>
    117                                          
    118                                          </td>
    119                                      </tr>
    120                                      <tr>
    121                                          <td style="vertical-align:middle;">Height:</td>
    122                                          <td>
    123                                          
    124                                          </td>
    125                                      </tr>
    126                                  </table>            
    127                              </div>
    128                          </div>
    129                      </asp:panel>
    130                      <div style="clear: both; text-align:right; vertical-align:middle; border-top: solid 1px #cccccc; height: 30px;">
    131                          <asp:button runat="server" id="BackButton" text="back" enabled="false" onclick="BackButton_Click" />
    132                          <asp:button runat="server" id="NextButton" text="next" enabled="false" onclick="NextButton_Click" />
    133                          <asp:button runat="server" enabled="false" id="FinishButton" text="finish" onclick="FinishButton_Click" />
    134                          <asp:button runat="server" id="CancelButton" text="cancel" onclick="CancelButton_Click" />
    135                      </div>
    136                  </contenttemplate>
    137              </asp:updatepanel>
    138          </asp:Panel>
    139          <asp:button runat="server" id="InvisButton" text="you can't see me" enabled="false" style="visibility:hidden;"/>
    140          <ajax:ModalPopupExtender ID="ModalPopupExtender" runat="server" TargetControlID="InvisButton" PopupControlID="ResourceGalleryPanel" BackgroundCssClass="GalleryBackground" DropShadow="true" OkControlID="FinishButton" CancelControlID="CancelButton" />
    141      </contenttemplate>
    142  </asp:updatepanel>
    
     
  • Re: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    01-10-2007, 3:07 PM
    • Member
      4 point Member
    • morocco
    • Member since 01-10-2007, 12:21 AM
    • Posts 2

    I am getting a similar problem.

     I am using a usercontrol to host the following (this is pre-cleaning, it's a proof of concept). Popup extender is at the bottom.

    I am getting that JScript error when I try to navigate AWAY from the page.

    1    <asp:updatepanel updatemode="Conditional" id="ResourceGalleryUpdater" runat="server">
    2        <contenttemplate>
    3            <asp:Panel ID="ResourceGalleryPanel" runat="server" CssClass="GalleryPopup" style="display:none;">
    4                <asp:updatepanel updatemode="Always" id="InnerUpdater" runat="server">
    5                    <contenttemplate>
    6                        <asp:panel runat="server" id="AssetSelectPanel">
    7                            <div class="Page1LeftPanel">
    8                                <div id="FolderList">
    9                                    <div id="FolderListTitle" class="title">
    10                                       Folder List
    11                                   </div>
    12                                           <asp:treeview id="FolderTreeXP" runat="server" imageset="XPFileExplorer" nodeindent="15" onselectednodechanged="FolderTreeXP_SelectedNodeChanged">
    13                                               <parentnodestyle font-bold="False" />
    14                                               <hovernodestyle font-underline="True" forecolor="#6666AA" />
    15                                               <selectednodestyle backcolor="#B5B5B5" font-underline="False" horizontalpadding="0px"
    16                                                   verticalpadding="0px" />
    17                                               <nodestyle font-names="Tahoma" imageurl="resources/folder.png" font-size="8pt" forecolor="Black" horizontalpadding="2px"
    18                                                   nodespacing="0px" verticalpadding="2px" />
    19                                           </asp:treeview>
    20                               </div>
    21                           </div>
    22                           
    23                           <div style="height: 400px; width: 1px; float: right; background-color: #cccccc; margin: 0px auto 0px auto;"></div>
    24                           
    25                           <div class="Page1RightPanel">
    26                               <div id="FileList">
    27                                   <div id="FileListTitle" class="title">
    28                                       File List
    29                                   </div>
    30                                   <asp:updatepanel updatemode="Conditional" id="AssetUpdate" runat="server">
    31                                       <contenttemplate>
    32                                           <div id="FileListDiv" style="overflow:auto; height: 350px; padding: 2px;" >
    33                                               <asp:repeater onitemcommand="AssetItemCommand" id="AssetRepeater" runat="server" enableviewstate="false" >
    34                                                   <itemtemplate>
    35                                                       <asp:panel bordercolor="blue" id="AssetPanel" runat="server" height="108px" width="316px">
    36                                                           <table class="AssetTable" width="316px" cellpadding="0" cellspacing="0">
    37                                                               <tr>
    38                                                                   <td style="width:1px; overflow:auto;"><img alt="Left Border" src="Resources/AssetLeft.png" height="108px" width="1px" /></td>
    39                                                                   <td valign="middle" class='<%# GetAssetClassName(((BMW.CMS.Business.Asset) Container.DataItem).AssetGuid)%>' align="center" style="width: 120px;">
    40                                                                       <asp:imagebutton imagealign="AbsMiddle" commandname="Select" commandargument='<%# DataBinder.Eval( Container.DataItem, "AssetGuid" ) %>' runat="server" id="PreviewImage" ImageUrl='<%# "preview.ashx?h=96&w=96&vid=" + DataBinder.Eval(Container.DataItem, "CurrentFile.FileGuid") %>' />
    41                                                                   </td>
    42                                                                   <td class='<%# GetAssetClassName(((BMW.CMS.Business.Asset) Container.DataItem).AssetGuid)%>'>
    43                                                                       <asp:linkbutton runat="server" commandname="Select" commandargument='<%# DataBinder.Eval( Container.DataItem, "AssetGuid" ) %>' id="Name">
    44                                                                           <b><%# DataBinder.Eval(Container.DataItem, "Name") %></b>
    45                                                                       </asp:linkbutton>
    46                                                                       <br />
    47                                                                       <%# GetKB(((BMW.CMS.Business.Asset)Container.DataItem).CurrentFile.FileBytes.Length)%> KB <%# ((string)DataBinder.Eval(Container.DataItem, "AssetType.FileExtension")).ToUpper()%> File<br />
    48                                                                       <%# DataBinder.Eval(Container.DataItem, "CurrentFile.Dimensions")%><br />
    49                                                                       <%# DataBinder.Eval(Container.DataItem, "CurrentFile.Duration")%><br />
    50                                                                       Current Version Uploaded on <%# ((BMW.CMS.Business.Asset)Container.DataItem).CurrentFile.UploadDate.ToShortDateString()%><br />
    51                                                                   </td>
    52                                                                   <td align="right" style="width:2px; overflow:hidden;"><img alt="Right Border" src="Resources/AssetRight.png" height="108px" width="2px" /></td>
    53                                                               </tr>
    54                                                           </table>
    55                                                       </asp:panel>
    56                                                       <script type="text/javascript">
    57                                                           
    58                                                       </script>
    59                                                   </itemtemplate>
    60                                                   <separatortemplate>
    61                                                       <div style="height:2px;"></div>
    62                                                   </separatortemplate>
    63                                               </asp:repeater>
    64                                           </div>
    65                                       </contenttemplate>
    66                                   </asp:updatepanel>            
    67                               </div>
    68                           </div>
    69                       </asp:panel>
    70                       
    71                       
    72                       
    73                       <asp:panel runat="server" id="AssetPropertiesPanel" visible="false">
    74                           <div style="height: 400px; width: 49%; float: left;">
    75                               <div id="Preview">
    76                                   <div id="PreviewTitle" class="title">
    77                                       Preview
    78                                   </div>
    79                                   <asp:updatepanel updatemode="Conditional" id="PreviewUpdate" runat="server">
    80                                       <contenttemplate>
    81                                           <table cellpadding="0" cellspacing="0" style="height: 390px; width: 300px; margin: auto;">
    82                                               <tr>
    83                                                   <td valign="middle" align="center" style="vertical-align: middle;">
    84                                                       <asp:Image id="PreviewImage" visible="false" runat="server" cssclass="PreviewImage" />
    85                                                       <asp:panel id="PreviewMessage" cssclass="InfoMessage" runat="server">
    86                                                           <b>Asset Preview.</b><br />
    87                                                           Select an asset to preview.
    88                                                       </asp:panel>
    89                                                   </td>
    90                                               </tr>
    91                                           </table>
    92                                       </contenttemplate>
    93                                   </asp:updatepanel>            
    94                               </div>
    95                           </div>
    96                           <div style="height: 400px; width: 49%; float: right;">
    97                               <div id="Properties">
    98                                   <div id="PropertiesTitle" class="title">
    99                                       Properties
    100                                  </div>
    101                                  <table style="background-color: #f8f8f8;" cellpadding="2px" cellspacing="0px" width="100%">
    102                                      <tr style="height: 20px; font-size: 12px; font-family:Arial;">
    103                                          <td style="vertical-align:middle;">Subscribe to asset:</td>
    104                                          <td>
    105                                          
    106                                          </td>
    107                                      </tr>
    108                                      <tr>
    109                                          <td style="vertical-align:middle;">Alternate Text:</td>
    110                                          <td>
    111                                              <asp:textbox id="AltText" runat="server"></asp:textbox>
    112                                          </td>
    113                                      </tr>
    114                                      <tr>
    115                                          <td style="vertical-align:middle;">Width:</td>
    116                                          <td>
    117                                          
    118                                          </td>
    119                                      </tr>
    120                                      <tr>
    121                                          <td style="vertical-align:middle;">Height:</td>
    122                                          <td>
    123                                          
    124                                          </td>
    125                                      </tr>
    126                                  </table>            
    127                              </div>
    128                          </div>
    129                      </asp:panel>
    130                      <div style="clear: both; text-align:right; vertical-align:middle; border-top: solid 1px #cccccc; height: 30px;">
    131                          <asp:button runat="server" id="BackButton" text="back" enabled="false" onclick="BackButton_Click" />
    132                          <asp:button runat="server" id="NextButton" text="next" enabled="false" onclick="NextButton_Click" />
    133                          <asp:button runat="server" enabled="false" id="FinishButton" text="finish" onclick="FinishButton_Click" />
    134                          <asp:button runat="server" id="CancelButton" text="cancel" onclick="CancelButton_Click" />
    135                      </div>
    136                  </contenttemplate>
    137              </asp:updatepanel>
    138          </asp:Panel>
    139          <asp:button runat="server" id="InvisButton" text="you can't see me" enabled="false" style="visibility:hidden;"/>
    140          <ajax:ModalPopupExtender ID="ModalPopupExtender" runat="server" TargetControlID="InvisButton" PopupControlID="ResourceGalleryPanel" BackgroundCssClass="GalleryBackground" DropShadow="true" OkControlID="FinishButton" CancelControlID="CancelButton" />
    141      </contenttemplate>
    142  </asp:updatepanel>
    
     
  • Re: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    01-16-2007, 4:42 PM
    • Member
      356 point Member
    • ncipollina
    • Member since 10-20-2006, 11:36 AM
    • Richmond, VA USA
    • Posts 79

    We too were having this same problem.  I have finally found a workaround.  The issue is caused when the Ok and/or Cancel Buttons of the ModalPopupExtender are defined within the UpdatePanel of the Panel that is popped up.  To fix the problem with the code provided, do the following:

     Change this line:

    <ajax:ModalPopupExtender ID="ModalPopupExtender" runat="server" TargetControlID="InvisButton" PopupControlID="ResourceGalleryPanel" BackgroundCssClass="GalleryBackground" DropShadow="true" OkControlID="FinishButton" CancelControlID="CancelButton" />

    To:

    <ajax:ModalPopupExtender ID="ModalPopupExtender" runat="server" TargetControlID="InvisButton" PopupControlID="ResourceGalleryPanel" BackgroundCssClass="GalleryBackground" DropShadow="true" OkControlID="btnMFinish" CancelControlID="btnMClose" />

    <asp:Button ID="btnMClose" runat="server" Style="visibility: hidden" />

    <asp:Button ID="btnMFinish" runat="server" Style="visibility: hidden" />

     

    This issue seems to stem from the fact that the ModalPopupExtender is not expecting to have the Ok and Cancel controls in the update panel.  Normally, you cannot define and Code Behind for these Buttons click events.  So when you Click on these buttons, and they post back to the server, something is broken between the ModalPopupExtender and the buttons.  By defining dummy buttons to take their place, it will make the web page stop throwing the javascript exception.  Even though the buttons are invisible, and do not do anything.

     I hope this helps.

     Thanks,

    Nick

  • Re: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    01-17-2007, 1:09 AM
    • Member
      71 point Member
    • coospaa
    • Member since 07-18-2006, 8:45 AM
    • Posts 20

    Thanks Nick, it works. Another way is not to specify OkControlID and CancelControlID but use ModalPopupExtender.Show() or Hide() instead.

  • Re: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    03-06-2007, 3:39 PM
    • Member
      116 point Member
    • jfkrueger
    • Member since 02-28-2006, 12:58 AM
    • Posts 103

    None of these worked for me. On my page I have several dynamically generated link buttons inside a repeater control. When any one of those linkbuttons is clicked I want the popupextender to show it's panel. It works fine until a postback (hit submit on the popup panel) and then when I click one of the linkbuttons I get the error.

    Any clues on this? I have tried all suggestions above and none of them work..

  • Re: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    05-04-2007, 5:21 PM
    • Member
      101 point Member
    • jeffreymergler
    • Member since 02-11-2003, 11:44 AM
    • NJ, USA
    • Posts 25
    jfkrueger:

    None of these worked for me. On my page I have several dynamically generated link buttons inside a repeater control. When any one of those linkbuttons is clicked I want the popupextender to show it's panel. It works fine until a postback (hit submit on the popup panel) and then when I click one of the linkbuttons I get the error.

    Any clues on this? I have tried all suggestions above and none of them work..

     

    None of these suggestions worked for me either.  I did try a number of things here and elsewhere... no joy.

    The only thing that appears to work is the removal of a reference to smartNavigation:

     web.config

    <pages smartNavigation="true">

    ... 

    </pages> 

     to  

     

    <pages>

    ... 

    </pages>

    If I re-add it, I get the error.  Remove it again, the same steps do not throw the error.  I guess smartNav is a no-no in my situation.
     

  • Re: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    05-11-2007, 5:58 AM
    • Participant
      916 point Participant
    • Vinija
    • Member since 05-11-2007, 9:45 AM
    • Posts 154

    I've had similar problem not when navigation out of the page but when trying to use $removeHandler method.

    It seems that sometimes the event is not added to the element and therefore trying to remove it, no meter  in what

    method causes this  error.

     

    If this handler should be the only one try to use    Sys.UI.DomEvent.clearHandlers(element) method.

    That won't throw an error even if the handlers collection is empty.


     

    Ran.
    Blog
  • Re: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    07-09-2007, 2:28 AM
    • Member
      20 point Member
    • sivamyneni
    • Member since 05-07-2007, 5:20 AM
    • Posts 24

    I am also facing the same problem. my page contains some hyperlinks which is redirecting to the same page with some query string. when ever i clicked that hyperlinks the error will appear. pls help

    Siva.Myneni
  • Re: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method after upgrading to RC1

    12-24-2007, 10:43 AM
    • Member
      2 point Member
    • davidpeng2004
    • Member since 12-24-2007, 3:40 PM
    • Posts 1

    This issue caused by Updatepanel which will not allow to put server side button inside it. You could work around it like me. See the hightlight line as following 

     
                <%--Book Details Display--%>
                <asp:Button id="btnShowPopup" runat="server" style="display:none" />
                <cc1:ModalPopupExtender ID="mdlPopup" runat="server"
                    TargetControlID="btnShowPopup"
                    PopupControlID="pnlBookDetailPanel"
                    DropShadow="true"
                    PopupDragHandleControlID="PanelTitle"
                    BackgroundCssClass="modalPopupBackground"
                    CancelControlID="btnClose"/>
                   
                <asp:Panel ID="pnlBookDetailPanel" runat="server" CssClass="modalPopupPanel">
                    <asp:Panel ID="PanelTitle" runat="server" CssClass="modalPopupTitleBar" >
                        <asp:Literal ID="Literal1" runat="server" Text="Book Informaton Popup"></asp:Literal>
                    </asp:Panel>
                   
                    <asp:UpdatePanel ID="upBookDetails" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                        <center> 
                            <table>
                                <tr>
                                    <td style="width: 100px; height: 26px;"><asp:Label ID="lblTitle" runat="server" Text="Book Title"></asp:Label></td>
                                    <td style="width: 100px; height: 26px;"><asp:TextBox ID="txtBookTitle" runat="server"></asp:TextBox></td>
                                </tr>
                                <tr>
                                    <td style="width: 100px"><asp:Label ID="Label1" runat="server" Text="Book Author"></asp:Label></td>
                                    <td style="width: 100px"><asp:TextBox ID="txtBookAuthor" runat="server"></asp:TextBox></td>
                                </tr>
                                <tr>
                                    <td style="width: 100px"><asp:Label ID="Label2" runat="server" Text="Category"></asp:Label></td>
                                    <td style="width: 100px"><asp:TextBox ID="txtBookCategory" runat="server"></asp:TextBox></td>
                                </tr>
                                <tr align="right">
                                    <td colspan="2">

                                        <%--dont put your server side button here --%>
                                    </td>
                                </tr>
                               
                            </table>
                            </center>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btnSave" />
                            <asp:AsyncPostBackTrigger ControlID="btnNew" />
                        </Triggers> 
                      
                    </asp:UpdatePanel>  

                      <div>
                                        <asp:Button ID="btnNew" runat="server" Text="New" Width="50px" OnClick="btnNew_Click" />                 
                                        <asp:Button ID="btnSave" runat="server" Text="Save" Width="50px" OnClick="btnSave_Click" />                 
                                        <asp:Button ID="btnClose" runat="server" Text="Close" Width="50px" OnClick="btnCloseClick"/>

                     <div>
                </asp:Panel>

Page 1 of 2 (27 items) 1 2 Next >