Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

302
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda