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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:31:52+00:00 2026-06-03T23:31:52+00:00

I would like get all data into an object with request ajax. This data

  • 0

I would like get all data into an object with request ajax.

This data are get into my controller with a function.
In the headers of my data I have this information:

I have 4 objects allPly create but all data(gramme,lotion and others) equals null or zero.
But the data comment and OtherData it’s ok, this works.

Thanks for your help

My Request:

var params={};
var allStep21 ={allData..}
$.extend(params,allStep21);
 $.ajax({
    type: "POST",
    url: "Request",
    data: params,
});

In the headers html:

allPly[0][Gramme]:10
allPly[0][Toto]:White
allPly[0][Test]:None
allPly[0][Lotion]:1
allPly[1][Grammage]:11
allPly[1][Toto]:White
allPly[1][Test]:Fine
allPly[1][Lotion]:0
OtherData : 585
Comment: all it's ok

In my controller:

[HttpPost]
public ActionResult Request(AllStep21 allStep21)
{
}

In my model:

public class AllStep21
{
    public String OtherData { get; set; }
    public String Comment { get; set; }
    public List<allPly> allPly { get; set; }
}
public class allPly
{
    public int Gramme { get; set; }
    public String Toto { get; set; }
    public String Test { get; set; }
    public int Lotion { get; set; }
}
  • 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-03T23:31:53+00:00Added an answer on June 3, 2026 at 11:31 pm

    You could use a JSON request which allows you to send arbitrary complex objects to your controller actions:

    var params = { 
        allStep21: { 
            comment: 'some comment', 
            otherData: 'some other data',
            allPly: [
                { toto: 'toto 1', test: 'test 1', lotion: 1, gramme: 1 },
                { toto: 'toto 2', test: 'test 2', lotion: 2, gramme: 2 }
            ]
        } 
    };
    
    $.ajax({
        url: 'Request',
        type: 'POST',
        contentType: 'application/json; charset=utf-8',
        data: JSON.stringify(params),
        success: function(result) {
            alert('successs');
        }
    });
    

    The JSON.stringify method shown here is natively built into all modern browsers. But if you need to support legacy browsers you need to include the json2.js script.

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

Sidebar

Related Questions

I have a table, which holds (besides all other data) information, when this data
I would like to get all possible available currencies. Java 7 had provided such
Given an HTML page I would like to get all the 'x' files that
I would like to decompile a .swf file and get all the images from
I would like to get the dimensions (coordinates) for all the HTML elements of
I would like to get a reference to all objects in the Java heap,
I would like to be able to get a list of all possible files
I would like to get some information on list of points that needs to
I am creating an object server-side which is to have all of the data
I have an array of objects called objarray . Each object looks like this:

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.