gpt4 book ai didi

javascript - "Parameter count mismatch"发生在 asp.net 中的按钮的单击事件上

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:08:05 27 4
gpt4 key购买 nike

每次点击按钮都会出错

Microsoft JScript runtime error: Sys.ParameterCountException: Parameter count mismatch.

Function.emptyFunction = Function.emptyMethod = function Function$emptyMethod() {
/// <summary locid="M:J#Function.emptyMethod" />
if (arguments.length !== 0) throw Error.parameterCount();
}//Error is occuring here.

是的,我在此页面中使用 JavaScript 确认消息,它包含在母版页、更新面板和 ScriptManager 中,以及在客户端单击按钮时,单击此按钮后出现错误,下面是我的代码

function Confirm() {
if(document.getElementById('<%= btnSave.ClientID %>').value=="UPDATE")
{
if(document.getElementById('<%= userStatus.ClientID %>').value=="INACTIVE")
{
if (confirm("do you want to make the user INACTIVE? \n By making the user INACTIVE means its all assigned role will be revoked"))
{
document.getElementById("confirm_value").value = "Yes";
}
else
{
document.getElementById("confirm_value").value = "No";
}
}
else
{
document.getElementById("confirm_value").value = "active";
}
}
}//endFun

最佳答案

实际上,我在母版页和更新面板中使用了 ScriptManager,因此为了消除此错误,我设置了 ScriptManeger 的“ScriptMode="Release"”,它现在可以正常工作了,不会再出现该错误了。这是链接这帮助了我 http://msdn.microsoft.com/en-us/library/bb344940%28v=vs.110%29.aspx

关于javascript - "Parameter count mismatch"发生在 asp.net 中的按钮的单击事件上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22810604/

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