All Questions
1,036 questions
1
vote
1
answer
67
views
When AJAX POST to C# httpPost medthod hasProblem
When I using jquery Ajax POST method to controller like:
var data = {
ID: '1',
name: 'TEST',
}
$.ajax({
type: "POST",
data: JSON.stringify(data),
dataType: &...
2
votes
3
answers
461
views
Passing two parameters (IFormFile and a string) with JSON to C#
Versions:
ASP.NET and Web Tools - 17.10.341.11210
C# Tools - 4.10.0-3.24312.19+
JQuery - 3.3.1.js
JS - 2.8.3.js
I'm trying to pass an IFormFile and a string from a JSON file select and a string input.
...
1
vote
1
answer
105
views
AJAX POST call to a controller is passing NULL
Call from View
$.ajax({
url: _urls.saveNoteDetailsUrl,
type: "POST",
cache: false,
contentType: "application/json",
data: JSON.stringify(inputModel),
...
1
vote
1
answer
38
views
Attempting to pass a list of objects using ajax to my controller yields null data
I'm passing a list of objects in JSON to my controller, the communication appears to be working but the data coming into my controller that I am passing is coming up null. I've scoured so many ...
1
vote
1
answer
167
views
update div without page reload using ajax or a quick tool
I have the following form:
<div class=" modal-dialog p-3 shadow-xl modal-xl" id="myModal">
<form method="post" asp-action="Edit" asp-controller=&...
1
vote
0
answers
84
views
asp.net webapi works in browser and postman, but Jquery Ajax can't parse the returned JSON object
Fiddled with every imaginable combination of webapi controller and jquery ajax script which, when debugging, does make a get call to the controller, but it won't parse the data (in debug, the data is ...
0
votes
1
answer
129
views
How to read a c# server side value in jquery
I've a JArray response value like below
{[
{
"id": "90b254dc-3fcd-4e7c-9943-59bce366ccdc",
"invoice_number": "510002500007368"
}
]}
i'm getting ...
0
votes
1
answer
50
views
How to get a simple JSON string from response through jQuery
I have a simple jQuery function that calls a controller action which should return a JSON string. However, I am unable to get the value of the string.
The popup box just says 'undefined'.
I have ...
0
votes
3
answers
2k
views
Upload files using .Net 6 MVC model biding serialization by jQuery Ajax/JSON
Need to upload files using MVC model biding by AJAX jQuery/JSON.
I was uploading with a normal submit form, but now I need to change to AJAX.
How can I do this? I mean, biding using MVC and AJAX, ...
-1
votes
1
answer
383
views
Auto map JSON AJAX returned data to table row in Jquery/JavaScript
Ok I have created a tab with a table inside of it as follows -
function createTab(Name, id) {
var $button = $('<button/>', {
'class': 'tablinks',
'onclick': 'return false;',
...
-3
votes
3
answers
2k
views
jQuery ajax passing null to controller in ASP .NET MVC
I am trying to send stringified array from view with $.ajax but I am constantly getting null in controller.
This is controller function:
[HttpPost]
public void SaveColumnsToDb(string data)
...
0
votes
0
answers
292
views
Delay between ajax call and Controller method receiving
I have a page in which I execute an ajax call to an ActionResult passing a JSON as data.
Ajax Call:
$.ajax({
contentType: "application/json; charset=utf-8",
traditional: true,...
0
votes
1
answer
184
views
Jquery datatables in razor view with thousands of rows/records
I'm developing a project that, inside a razor view, calls an external server and retrieves a json file (WebRequest, StreamReader on response) that I use to build a table.
I don't have access to the ...
0
votes
2
answers
37
views
Loop nested array values using jQuery
Using the following JSON below, how do I loop the inner Errors and Messages values using jQuery:
JSON Format:
{
"PagesCreated":0,
"AssetsCreated":0,
"AssetsUpdated&...
0
votes
1
answer
1k
views
Getting text/html Response instead of application/json on user machine in case of Exception
I am experiencing strange issue with JSON response.
MVC Application A hosted on Server A. when user browse the URL which internally calls MVC action for fetching data in UI using JQuery Ajax.
MVC ...