Sys.ParameterCountException: Parameter count mismatch

I face the following problem in firefox and google chrome :

Sys.ParameterCountException: Parameter count mismatch. 

I call the following javascript method onclick :

<script type="text/javascript">
        var confirmSubmited = false;
        function SubmitWithLog(par_name, par_address, frm) {

                url: "/LogAction.ashx?par_name=" + par_name + "&par_address=" + par_address,
                type: "GET",
                timeout: 3000,
                async: true, // you can try and async:false - maybe is better for you
                data: action = 4, // here you send the log informations
                cache: false,
                success: function(html) {
                error: function(responseText, textStatus, XMLHttpRequest) {

            return false;

The link from firebug will render like this :

<a href="#" onclick="SubmitWithLog('%d8%b7%d9%84%d8%a8+%d8%a5%d9%84%d8%aa%d9%85%d8%a7%d8%b3+‌​%d9%84%d9%84%d9%85%d9%88%d8%a7%d8%b1%d8%af+%d8%a7%d9%84%d8%a8%d8%b4%d8%b1%d9%8a%d‌​8%a9','...../RequestList.aspx','#ctl43');return false;">GO </a>

according to the following link :

Error: Sys.ParameterCountException: Parameter count mismatch.

I set the ScriptMode = "release"

but i get another error

this._toFormattedString is not a function

This problem isn't exist in IE.


public class LogAction : IHttpHandler, System.Web.SessionState.IRequiresSessionState

        public void ProcessRequest(HttpContext con)
            // log here what you wish
            string[] statistics = TrackUser();
            string a = HttpUtility.UrlDecode(con.Request.Params["Par_name"].ToString());
            string b = con.Request.Params["Par_address"].ToString();

            TraceActivity(a, b, statistics[0], statistics[1], statistics[2]);
            // end up with no content
            con.Response.TrySkipIisCustomErrors = true;
            con.Response.Status = "204 No Content";
            con.Response.StatusCode = 204;


Possibly worth wrapping your data: item in quotes

data: action = 4


data: "action = 4"

“Parameter count mismatch” is occurring on the click event of a button in Ask Question Sys.ParameterCountException: Parameter count mismatch.

Thats what happens when you call a public method of an ajax API with the incorrect number of parameters. For example, try Boolean.parse("true", "what?"). It only takes 1 parameter, you passed in 2 or your sending a null value.

also your submit link ...../RequestList.aspx does not look like a proper address. so make sure you are not passing null or wrong parameters.

'Sys.ParameterCountException: Sys.ParameterCountException [Answered] RSS 2 replies Last post Jan 12, 2009 01:26 AM by Lance Zhang - MSFT

setting debug="false" in de web.config seemed to remove the error

Once i added the scriptmanager It started throwing an error-->"Microsoft JScript runtime error: Sys.ParameterCountException: Parameter count mismatch." i am not understanding how to fix it can anybody help me figure out this issue or somehow work arround it?

Microsoft JScript runtime error: Sys.ParameterCountException: Parameter count mismatch." i am not understanding how to fix it can anybody help me figure out this issue or somehow work arround it? What I have tried: I am using Amchart libraries along with ajax.when Chart is loaded am getting above error

I have a workaround that seems to be working consistently. I am now using a label control. I used the insert reference button and chose "Created" from the item properties.

es6-shim.min.js (v0.34.1) in SharePoint - Uncaught Sys.ParameterCountException: Sys.ParameterCountException: Parameter count mismatch. #399 williamyinssw opened this issue Jan 12, 2016 · 8 comments

  • I am not sure that this code have to do with the error, is it possible to give me the real url on web to see the full page ?
  • The web site still in developing phase :(
  • Is the error coming from your Ajax request or from your form submission? What does LogAction.ashx do? Can you post the relevant server-side code?
  • @just_name The error looks like a .NET error, and so is coming from LogAction.ashx. (ScriptMode = "release" only hides the error from the client; it doesn't fix anything.) What does the link render to in IE?
  • Please add the $.noConflict(); right after you load the jQuery. As you see here :
  • @just_name Any comments? This should be the only reason your getting this error. If the answer did not lead to a solution please show your ashx function...
  • what did u mean by the public methods of ajax APi ,i don't think i use some thing like this . i will show the ashx func
  • @just_name in your function change the Par_name Par_address to lower case.
  • The same error : this._toFormattedString is not a function http://localhost:6450/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a7263e9c6-5962-41bc-b839-88b704bfcf0d%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2011.2.712.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a326e32e2-cd52-462c-ba2c-db5128e4371b%3a16e4e7cd%3addbfcb67%3af7645509%3a24ee1bba%3a19620875%3a3f6e8f3f Line 6