Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
4 answers
55 views

Ajax post call to Controller method keeps saying 400 Bad Request

I am trying to make an Ajax post call to a method in my HomeController but I keep getting 400 Bad Request error. This is the ajax call $.ajax({ url: '/home/findareacode', contentType: '...
Afz's user avatar
  • 77
-1 votes
0 answers
25 views

Return view from nested classes in ASP.NET MVC for complex json String

My Model is : (Problematic section is Variant[] Variants, that is not passing to controller) public class SingleProduct { public Product1 product { get; set; } } public class Product1 { [...
Samie Ullah's user avatar
0 votes
2 answers
53 views

Problem in sending data to the controller through Ajax in ASP.NET MVC

I use this foreach: foreach (var item2 in RItem.GetChildItems(item.ID_Ca)) { <div id="@idc" class="accordion-collapse collapse" aria-labelledby="headingTwo2" ...
Hamed Javadi's user avatar
0 votes
0 answers
21 views

ngrok redirects to localhost instead of ngrok-url in ajax callback (ASP.NET project)

I have an ASP.NET project. I'm using NGROK to access and test the project remotely, mainly because I'm testing a webhook so my project needs to be callable from an external source. Every normal HTML-...
proost daan's user avatar
-2 votes
0 answers
35 views

Pop-up is not showing on click of table cell element

I have a c# application which has javascript in it and i want to show popup on click on overall status in a table. But its not showing up. when i comment updateStatusCounts(); it shows up but when i ...
Pam's user avatar
  • 15
0 votes
2 answers
84 views

Ajax - pass string[] to c# controller

MVC Core. JS: var currentSelection = []; function selection_changed(selectedItems) { var dataGrid = $("#myContainer").dxDataGrid("instance"); var data = selectedItems....
guidempty's user avatar
0 votes
1 answer
40 views

C# ajax post request 404 not found

I have an ajax query running from a page located in a folder Project/Pages/IT/NewEmailSetup I want it to call a post request to a controller thats located in Project/Controllers/...
Ben Bodie's user avatar
0 votes
0 answers
43 views

Checkbox is not selecting paginated data in JavaScript

I have a C# MVC project , in which I am trying to select all the checkbox using header checkbox in table. but on selection it only selects first page data not all paginated data. I am using AJAX for ...
Pam's user avatar
  • 15
0 votes
1 answer
58 views

ASP.NET Core 8 Web API + Ajax call to controller: Completely disable Cors

I created a website with API using .NET 8 and Razor, and I'm hosting my website using AWS Elastic Beanstalk. My website allows to create and save tests, and it works just perfectly from my side, not ...
Diego Perez's user avatar
  • 2,588
1 vote
2 answers
41 views

Cascading dropdown AJAX loop call

there is a part of my form in which a user can enter the building and room and click the add button if they want to enter another building and room. I am using AJAX to populate the rooms based on the ...
littlelion111's user avatar
0 votes
1 answer
19 views

Problem sending json data from js file to .NET controller through ajax post

So, I am trying to get from the client (js) to the server (.net controller) a json string through an ajax post. For some reason, which I cannot understand, it arrives into the controller, but the list ...
Bogdan Alexandru Rus's user avatar
0 votes
1 answer
34 views

Ajax Posting string to controller action returns 404

On keyup I call a JavaScript function, this function should make a call to a controller action and return a result but I am getting a 404 error. I have breakpoints at the top of the controller action ...
ItsDataMiner's user avatar
0 votes
0 answers
37 views

The requested resource does not support http method 'GET'. (jquery-3.7.1.min.js:2 POST http://localhost:51067/Api/Values/Insertogrenci 401

I got this error while creating my student adding page, why could it be? The requested resource does not support http method 'GET'. $.ajax({ type: 'Post', url: "/Api/Values/...
Ezgi Eylül Aşkın's user avatar
0 votes
0 answers
68 views

When i load my PartialView html using jquery, an controller that i didn't call is called with 0 value id parameter

I have this View Edit.cshtml @model ProdutoViewModel @{ Layout = "_Layout"; } <nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb" class="...
Samuel Oliveira's user avatar
0 votes
0 answers
32 views

Can we parameterize jQuery ajax call for inserting data to database?

This is my simple code for inserting data to database and it's working fine. Table name is AccountMaster function Insert() { var Value = {}; Value.Id = $("[id*=hdnId]").val(); ...
Shaiwal Tripathi's user avatar

15 30 50 per page
1
2 3 4 5
608