繁体   English   中英

“参数计数不匹配”发生在asp.net中按钮的单击事件上

[英]“Parameter count mismatch” is occurring on the click event of a button in asp.net

当我点击按钮时出现错误

Microsoft JScript运行时错误: Sys.ParameterCountException:参数计数不匹配。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM