Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

300
Views
C#-JS Post call erroring after adding a second parameter

so I am editing this app and they are doing a post call that looks like this in JS.

var form = $('#addNewEduForm');
var serialized = form.serialize();

Serialized is a html page basically If you print out serialized you will get this. https://www.toptal.com/developers/hastebin/eyotorovar.apache

$.ajax({
    type: "POST",
    url: "/ListingDetails/OnSaveListingDetails",
    data: serialized

As shown above it works, but I am in need of adding a new parameter which makes it look like this and if I have it like this it gives me a null error on my c# post call.

    data: { listingDetailsSaveModel: serialized, itemSpecifics: ItemSpecifics }

This is my C# call

[HttpPost]
public JsonResult OnSaveListingDetails(ListingDetailsSaveModel listingDetailsSaveModel, string itemSpecifics)
        {}

Basically now listingDetailsSaveModel is null just because I added a new parameter to my call. ItemSpecifics gets its data correctly which is this https://www.toptal.com/developers/hastebin/lejedoxeki.json

Been at this for a few hours but I cant seem to figure it out. Any help would be greatly appreciated.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!