Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8172899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:56:06+00:00 2026-06-06T21:56:06+00:00

I am getting System.ArgumentException: Invalid JSON primitive: pagenum when I return sdata in the

  • 0

I am getting “System.ArgumentException: Invalid JSON primitive: pagenum” when I return “sdata” in the following code:

 function getPageData() {
pagenum = parseInt(eSc("#resultsBtn").attr("data-pagenum"));
if (pageName === "Home") {
    scrollPath = "/Home/GetResults/";
    sdata = { "pagenum": pagenum, "sortType": sortType };
}
else if (pageName === "Search") {
    scrollPath = "/SearchAjax/GetResultsKeyword/";
    sdata = { "pagenum": pagenum, "sortType": sortType, "keyword": keyword };
}
else if (pageName === "Cat") {
    scrollPath = "/SearchAjax/GetResultsCategory/";
    sdata = { "pagenum": pagenum, "sortType": sortType, "ID": categoryId, "Level": level };
}
else if (pageName === "Merchant") {
    scrollPath = "/SearchAjax/GetResultsMerchant/";
    sdata = { "pagenum": pagenum, "sortType": sortType, "ID": merchantId };
}

}

and the init function on pageload:

 function init(a, b, c, d, e, f, g) {
getPageData();
eSc.ajax({
    type: 'POST',
    url: scrollPath,
    data: sdata,
    success: function (data) {
        eSc("#moreResults").html(data);
    }
});

}

users dont see an issue and the correct data is still returned, yet I am getting an error email every time someone loads more data from our site in production (doesnt happen in development so its hard to troubleshoot). When inspecting in firebug, I see the correct data is passed. So why am I still getting this error?!

Any tips as to why this might be happening?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:56:07+00:00Added an answer on June 6, 2026 at 9:56 pm
    function init(a, b, c, d, e, f, g) {
    getPageData();
    eSc.ajax({
        type: 'POST',
        url: scrollPath,
        contentType: 'application/json',
        dataType: 'json',
        data: JSON.stringify(sdata ),
        success: function (data) {
            eSc("#moreResults").html(data);
        }
    });
    

    pass sData in json format, using JSON.stringify to format data in json format.

    It works in my case. Hope it work in your case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting a System.ArgumentException Value was invalid when calling RSACryptoServiceProvider.SignData with the following code:
Anyone know why I'm getting this error message? The error message: {Message:Invalid JSON primitive:
I’m getting system error when I try to compile the code below on Visual
I keep getting this error System.Web.HttpException was unhandled by user code Message=Validation of viewstate
I'm still new to code igniter and I'm having problems getting the login system
I'm getting the following error while testing my EHAB implementation: ArgumentException - Event log
I'm getting this err msg: System.ArgumentException was unhandled Message=Value with type Devart.Data.Oracle.OracleParameter not supported.
I am getting System.UnauthorizedAccessException was unhandled by user code when deleting user alerts by
The specific error that I'm getting is a System.ArgumentException with a message of Value
Getting system.entrypointnotfoundexception: loadlibrary While trying to use SevenZipLib.dll to uncompress the .7z file containing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.