2

我正在使用 ASP.NET 4.0、JS 和 Jquery 进行一些验证。在我的验证运行并返回 false 后,我的 js 抛出此错误。它还允许回发。

JS摘录抛出错误:

 var eventArgs = new Sys.WebForms.EndRequestEventArgs(error, data ? data.dataItems : {}, executor);
        Sys.Observer.raiseEvent(this, "endRequest", eventArgs);
        if (error && !eventArgs.get_errorHandled()) {
            throw error;
        }

我的完整错误信息:

SCRIPT5022: Sys.WebForms.PageRequestManagerServerErrorException: Index was outside the bounds of the array. 
ScriptResource.axd, line 938 character 13

我的 JS:

  if (regex) {
                result = patt.test($(this).val());
            } if (!result) {
                //return false;
                $(this).focus();
                alert("Please enter the " + failed_type + " in the following format: " + format);
                return false;
            }

按钮:

<asp:Button ID="Update" runat="server" 
        Text="Update" CssClass="button" 
        TabIndex="4" OnClientClick="return update_Click(event);" OnClick="Update_Click" /> 

调用堆栈:

PageRequestManager$_endPostback,ScriptResource.axd line 938
PageRequestManager$_parseDelta,ScriptResource.axd line 1653
PageRequestManager$_onFormSubmitCompleted,ScriptResource.axd line 1414
Anonymous Function, ScriptResource.axd, line627
Anonymous function, ScriptResource.axd, line 4337
raise, ScriptResource.axd, line 7247 
WebRequest$completed, ScriptResource.axd, line 7251
WebRequest$completed, ScriptResource.axd, line 7251 
4

0 回答 0