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

时间:2014-04-02 11:53:37

标签: javascript 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

1 个答案:

答案 0 :(得分:10)

实际上我在主页面和更新面板中使用ScriptManager,以便摆脱这个错误我设置“ScriptMode =&#34; Release&#34; “ScriptManeger,现在它的工作原理并没有出现错误。这是帮助我的链接 http://msdn.microsoft.com/en-us/library/bb344940%28v=vs.110%29.aspx