gpt4 book ai didi

c# - AjaxToolkit 日历扩展器上未捕获的 Sys.ArgumentOutOfRangeException : Sys. ArgumentOutOfRangeException : Value must be an integer.

转载 作者:行者123 更新时间:2023-12-05 00:44:49 24 4
gpt4 key购买 nike

我在使用 Ajax Control Toolkit 日历扩展器的文本框上遇到错误,我使用的是 Microsoft Edge、IE11、Chrome:

Uncaught Sys.ArgumentOutOfRangeException: Sys.ArgumentOutOfRangeException: Value must be an integer.Parameter name: y

无论是否在表单加载时填充的文本框都会出现此错误。

这是客户端代码

Remodel Date<br /><br />
<asp:TextBox ID="txtbxRemodelDate" runat="server" CssClass="detailscreenwidthstyle1"></asp:TextBox>

<asp:RegularExpressionValidator ID="txtbxStartDateRegularExpressionValidator" runat="server"
ControlToValidate="txtbxRemodelDate" Display="Dynamic" ErrorMessage="</br>*Date must be a valid date"
ValidationExpression="([1-9]|1[012])/([1-9]|[12][0-9]|3[01])/(19|20)\d\d"></asp:RegularExpressionValidator>

<cc1:CalendarExtender ID="CalendarExtender1" runat="server"
CssClass="blueCalendar" TargetControlID="txtbxRemodelDate"></cc1:CalendarExtender>

这是完整的错误

Uncaught Sys.ArgumentOutOfRangeException: Sys.ArgumentOutOfRangeException: Value must be an integer.Parameter name: yActual value was 625.5757446289062.at Function.Error$create [as create] (http://localhost/ScriptResource.axd?d=N9v-ex4jLgM8lHFu-PPLr2Aehppm2kCvkWv-sT6x6bMHJlxsZJOQTws_pzPtAPh87KkT1s87GA2MC3sHg242UGoTeK7AnwWYZ8KDIobeAa5Q7ArWAJqVtXJAaHQ_aXoSGb23JA2&t=ffffffffdd783992:847:15)at Function.Error$argumentOutOfRange [as argumentOutOfRange] (http://localhost/ScriptResource.axd?d=N9v-ex4jLgM8lHFu-PPLr2Aehppm2kCvkWv-sT6x6bMHJlxsZJOQTws_pzPtAPh87KkT1s87GA2MC3sHg242UGoTeK7AnwWYZ8KDIobeAa5Q7ArWAJqVtXJAaHQ_aXoSGb23JA2&t=ffffffffdd783992:908:21)at Function$_validateParameterType [as _validateParameterType] (http://localhost/ScriptResource.axd?d=N9v-ex4jLgM8lHFu-PPLr2Aehppm2kCvkWv-sT6x6bMHJlxsZJOQTws_pzPtAPh87KkT1s87GA2MC3sHg242UGoTeK7AnwWYZ8KDIobeAa5Q7ArWAJqVtXJAaHQ_aXoSGb23JA2&t=ffffffffdd783992:802:23)at Function$_validateParameter [as _validateParameter] (http://localhost/ScriptResource.axd?d=N9v-ex4jLgM8lHFu-PPLr2Aehppm2kCvkWv-sT6x6bMHJlxsZJOQTws_pzPtAPh87KkT1s87GA2MC3sHg242UGoTeK7AnwWYZ8KDIobeAa5Q7ArWAJqVtXJAaHQ_aXoSGb23JA2&t=ffffffffdd783992:719:18)at Function$_validateParams [as _validateParams] (http://localhost/ScriptResource.axd?d=N9v-ex4jLgM8lHFu-PPLr2Aehppm2kCvkWv-sT6x6bMHJlxsZJOQTws_pzPtAPh87KkT1s87GA2MC3sHg242UGoTeK7AnwWYZ8KDIobeAa5Q7ArWAJqVtXJAaHQ_aXoSGb23JA2&t=ffffffffdd783992:668:22)at new Point (http://localhost/ScriptResource.axd?d=N9v-ex4jLgM8lHFu-PPLr2Aehppm2kCvkWv-sT6x6bMHJlxsZJOQTws_pzPtAPh87KkT1s87GA2MC3sHg242UGoTeK7AnwWYZ8KDIobeAa5Q7ArWAJqVtXJAaHQ_aXoSGb23JA2&t=ffffffffdd783992:4739:22)at Function.DomElement$getLocation [as getLocation] (http://localhost/ScriptResource.axd?d=N9v-ex4jLgM8lHFu-PPLr2Aehppm2kCvkWv-sT6x6bMHJlxsZJOQTws_pzPtAPh87KkT1s87GA2MC3sHg242UGoTeK7AnwWYZ8KDIobeAa5Q7ArWAJqVtXJAaHQ_aXoSGb23JA2&t=ffffffffdd783992:5195:16)at Function.DomElement$getBounds [as getBounds] (http://localhost/ScriptResource.axd?d=N9v-ex4jLgM8lHFu-PPLr2Aehppm2kCvkWv-sT6x6bMHJlxsZJOQTws_pzPtAPh87KkT1s87GA2MC3sHg242UGoTeK7AnwWYZ8KDIobeAa5Q7ArWAJqVtXJAaHQ_aXoSGb23JA2&t=ffffffffdd783992:5126:36)at Sys.Extended.UI._CommonToolkitScripts.getBounds (http://localhost/facilities/facilitiesrenovation.aspx?TSM_HiddenField=ctl00_smScriptManager_HiddenField&TSM_CombinedScripts=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.51116.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3a07ead49c-3169-4e2b-b447-bacc452e967a%3ade1feab2%3afcf0e993%3af2c8e708%3a720a52bf%3af9cec9bc%3a589eaa30%3a698129cf%3afb9b4c57%3accb96cf9:3:3108)at Sys.Extended.UI.PopupBehavior.getBounds (http://localhost/facilities/facilitiesrenovation.aspx?TSM_HiddenField=ctl00_smScriptManager_HiddenField&TSM_CombinedScripts=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.51116.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3a07ead49c-3169-4e2b-b447-bacc452e967a%3ade1feab2%3afcf0e993%3af2c8e708%3a720a52bf%3af9cec9bc%3a589eaa30%3a698129cf%3afb9b4c57%3accb96cf9:29:1919)

我尝试了以下建议,但没有任何效果。

https://www.telerik.com/forums/sys-argumentoutofrangeexception-value-must-be-an-integer-ba4368c85de9

https://forums.asp.net/t/1620879.aspx

有一个建议建议修改 MicrosoftAjax.js,但我没有那个文件。

最佳答案

将以下内容放在 *.aspx 页面的底部将更正该问题:

    <script type="text/javascript" language="javascript">
//There's a bug in Microsoft's Ajax script that stops the modal popups from working
//This overrides the the code that causes the error
Sys.UI.Point = function Sys$UI$Point(x, y) {

x = Math.round(x);
y = Math.round(y);

var e = Function._validateParams(arguments, [
{ name: "x", type: Number, integer: true },
{ name: "y", type: Number, integer: true }
]);
if (e) throw e;
this.x = x;
this.y = y;
}
</script>

关于c# - AjaxToolkit 日历扩展器上未捕获的 Sys.ArgumentOutOfRangeException : Sys. ArgumentOutOfRangeException : Value must be an integer.,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65598105/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com