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 9036093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:54:20+00:00 2026-06-16T08:54:20+00:00

I have a Web API controller that accepts an Inspection model, i.e. public class

  • 0

I have a Web API controller that accepts an Inspection model, i.e.

public class Inspection
{
    public int ID {get; set;}
}

and I have create a POST method on the controller. This works fine and I have tested it with jQuery.

In my javascript page I create an Inspection, i.e.

var inspection = {
    ID: '123456'
};

and then do $.ajax like this:

var p = $.ajax({
    type: 'POST',
    url: 'http://...',
    cache: false,
    data: JSON.stringify(item),
    dataType: 'json',
    success: function(response) {
        //do stuff
    }
});

So my question is: if I have multiple inspections to post, how do I send them all to the controller either in one batch or in single batches?

  • 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-16T08:54:21+00:00Added an answer on June 16, 2026 at 8:54 am

    POST’ing multiple integers in a single call should be easy to do. A few quick things to check:

    1. In your controller, does your method signature look something like:

      public void Post([FromBody]int[] values) { // code here }
      

      Note the use of the [FromBody] attribute.

    2. In your POST, is the content type header set to “Content-Type: application/json“?

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

Sidebar

Related Questions

I have a Web API controller with the following actions: [HttpPut] public string Put(int
I have this action in Web Api controller: public Data GetData(ComplexModel model) and model
Let say I have two methods in MVC 4 Web API controller: public IQueryable<A>
Using the ASP.NET Web-Api, I have the following POST setup in my controller. When
I have the following action in my ASP.NET Web API: public IEnumerable<Car> carssOfUser(int id,
Consider an ASP.NET Web API service that redirects public class ThisController : ApiController {
Suppose I have a ASP.NET Web API controller that uses a service, which in
I have a MVC Web Api Controller that uses the [Authorize] attribute at the
I have the following API Controller: public class TestController : ApiController { [HttpPost] [APIAuthorizeAttribute]
using Newtonsoft.Json; namespace FAL.WebAPI2012.Controllers { public class Person { public int Id {get;set;} public

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.