I have an ASP.NET site that uses JQuery and ASP.NET UpdatePanel and ScriptManager. On one page in particular, I get a javascript error:
sys.webforms.pagerequestmanagerservererrorexception: Index and length must refer to a location within the string. Parameter name:length
ScriptResourse.axd Code: 0
Edit: This error does not occur in my development environment, only when I publish the code to the test server.
Here's what's in the master page:
<asp:ScriptManager runat="server" ID="ScriptMgr"></asp:ScriptManager>
<asp:UpdatePanel runat="server" ID="UpdatePanelMaster">
<ContentTemplate>
</ContentTemplate>
</asp:UpdatePanel>
In the page in question:
<asp:Content ID="ContentHeadEdit" ContentPlaceHolderID="ContentHeadMaster" Runat="Server">
<script type="text/javascript">
$(document).ready(function() {
$('#<%= ButtonSave.ClientID %>').button();
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args) {
$('#<%= ButtonSave.ClientID %>').button();
}
});
</script>
</asp:Content>