Linked Questions
42 questions linked to/from Passing A List Of Objects Into An MVC Controller Method Using jQuery Ajax
0
votes
1
answer
183
views
string array values is not passing from JavaScript to controller method [duplicate]
I am trying to pass the values from JavaScript string array variable into controller method. The method is called but the value is not being passed. Here is my example
Controller
[HttpPost]
...
193
votes
9
answers
247k
views
How can I post an array of string to ASP.NET MVC Controller without a form?
I am creating a small app to teach myself ASP.NET MVC and JQuery, and one of the pages is a list of items in which some can be selected. Then I would like to press a button and send a List (or ...
60
votes
9
answers
158k
views
Posting JSON Data to ASP.NET MVC
Im trying to get a list of line items to a webpage using JSON, which will then be manipulated and sent back to the server by ajax request using the same JSON structure that arrived (except having had ...
13
votes
5
answers
43k
views
Jersey, how to POST a list of JSON objects?
I am building a RESTful web-service in Java using Jersey 1.11, and have problems implementing a method which consumes a list of JSON-ised entities. The single instance method works fine.
The error I ...
7
votes
2
answers
38k
views
Continually receiving 400 (Bad Request) on jquery ajax post to MVC controller
My ajax call looks like this
$.ajax({ //actually approve or reject the promotion
url: url,
type: "POST",
data: '{'+data.PromotionId+','+data.UserId+','+...
4
votes
3
answers
12k
views
Passing A List Of Objects Into An ActionResult MVC Controller Method Using jQuery Ajax
possible duplicate Passing A List Of Objects Into An MVC Controller Method Using jQuery Ajax
but my question is when I pass
var things = [
{employee:'test',effectiveDate:'',expirationDate:'' },
...
2
votes
2
answers
6k
views
Passing JSON object to MVC
I am having a simple issue which is taking way to long to figure out. I cant seem to get data from JS into MVC.
JS:
var stuff = [{a: 1, b: "Low"}, {a: 5, b:"High"}];
...
0
votes
4
answers
15k
views
How to post array of json object to controller method
I am using below stuff to post list of object to controller ajax post method.
jQuery stuff:
var values = [];
values.push(rowData1);
values.push(rowData2);
values.push(rowData3);
var data = JSON....
2
votes
1
answer
4k
views
Pass an array of objects using jquery.load to MVC 3
I have run into an issue attempting to pass an array of objects to an MVC3 controller/action. I've found several discussions on the web (including here at SO) but none have solved my problem. Here is ...
2
votes
1
answer
4k
views
List passed to controller via AJAX is null
I'm trying to pass a List of objects back to my controller, but the List is null if/when it gets to the controller. Here is what I'm doing:
Controller Action Signature
[HttpGet]
public ActionResult ...
3
votes
1
answer
3k
views
ASP.NET Core 2.1 MVC send data from JavaScript to Action method using XMLHttpRequest
This is similar to below but without Ajax. I am using JavaScript and XMLHttpRequest
AJAX post data is null when it reaches the ASP.NET Core 2.1 controller
Everything works good in ASP.NET MVC but I ...
-2
votes
2
answers
2k
views
use jquery to store array of objects and pass it to server through ajax call
In my scenario i need to store some values in arrays of c# object and set some values to those. Then i need to store those values to database through ajax call. Please help me Any suggestions. I have ...
0
votes
1
answer
4k
views
Save Data from HTML table into SQL Server in MVC
Below is my Razor View
<tr id="CGT_Row">
<td class="noGutter">@Html.TextBoxFor(m => m.clsCGT.CGT_Visit_Date, new {@id="dp1", @class = "input-sm text-center ...
1
vote
2
answers
2k
views
List not passed properly via ajax to Controller Action in MVC 4
I pass a List(data) along with an ID(id) through ajax to the MVC Action(EditDesignTemplate).
I get the count of the parameter data list as 0 in my EditDesignTemplate Action while I can see that the ...
0
votes
2
answers
2k
views
How to send a objects array list to controller via ajax
I have a object in my javascript with a object array inside it. I want to send it to my controller via a ajax call. But my list never seems to get populated in my controller.
I make my machineList ...