Questions tagged [asp.net-ajax]
A set of extensions to ASP.NET developed by Microsoft for implementing Ajax functionality.
5,203
questions
0
votes
0
answers
8
views
How to Save Selected AutoComplete Value in a Hidden Field
I need help to save a autocomplete selected value to a hidden field. My Json result data for autocomplete is a list of degrees with Text and Value,like the below format:
[{Text: A, Value: 1},{Text:B, ...
0
votes
0
answers
22
views
I get a damaged zip file when i download it using AJAX in MVC with C#
I want to make a function that prompts a dialog box to download a zip file that contains an xlsx file within. Altough I can download the zip file, when I try to open the xlsx file I get an error ...
0
votes
0
answers
17
views
What is a proper way to POST multiple sets of data through AJAX to .Net Core EF Core
I have seen numerous examples, mostly wrong or outdated concepts written a decade ago. I cant seem to find a way to submit multiple variables to the ef core database using Ajax. I can get it to work ...
0
votes
1
answer
46
views
How do you get data and bind to a table?
I am trying to get data from a database and just bind the output to a table. I am using AJAX because some of my other codes won't allow me to mix with the IEnumerable. It doesn't seem to run the ...
0
votes
0
answers
31
views
Delete and Edit button onClick
I have two buttons Edit and Delete which displays a modal view that I call through ajax script. how do I tell ajax which function to execute if button edit/delete is clicked either way.
var ...
-1
votes
1
answer
14
views
Send a dictionary object from asp.net mvc response to another mvc action
I have an app that receives a dictionary object response from a MVC action in ajax call and I have another ajax call that pass dictionary to other MVC action
I have:
[HttpPost]
public IActionResult ...
0
votes
0
answers
58
views
How to call ASP.NET jQuery Ajax function from CodeFile Method ["website Project"]
I'm calling the ajax function using javascript in website project and the webmethod aspx page is running on CodeFile="NewPLPage.aspx.cs" and when I run the NewPLPage.aspx page I'm getting ...
0
votes
0
answers
11
views
Model is null in uploading asp.net rc1
I know this has been asked for so many times and I tried all the answers given like:
Adding "multipart/form-data" in enctype
Setting processData and ContentType to False
Naming my input ...
0
votes
0
answers
13
views
call Jquery function from Convform.js chatbot
How to call jquery function from Convform.js chatbot question ?
I am facing issue my question is not getting post
<div data-conv-fork="search">
<div ...
0
votes
0
answers
57
views
Update Image when the path string changes in the database ASP.NET MVC
I'm trying to build a navbar with an image in it, but I want to have the image change (essentially just the src) when it is updated in the database. Like I can have two tabs, one for edit and one for ...
1
vote
1
answer
100
views
When I call a function in asp.net webforms from asp.net core MVC using Ajax is not hitting the target?
I have two project such as Main Project in Dot net Core MVC and Target project in ASP.NET framework webforms I have a Test Method in Webform in Target Project , But I want access the method from Main ...
0
votes
1
answer
39
views
Display Confirmation bootstrap Modal when ModelState is valid using an ajax POST from Razor View
I have a scenario where I need to display a confirmation modal after the primary model has been validated on the server - using data annotations , but I want to actual commit to the DB to happen in ...
1
vote
1
answer
46
views
SMTP Email Works until triggering a 404 error in the middle of sending Mail
I have a table for email recipients imma database, and use the "select all" button from the gridview table as trigger to call the mail function. my iteration func to call the 'executeApprove'...
0
votes
0
answers
12
views
Ajax HTML Editor doesn't highlight on one PC, does on another
I support an ASP.Net 4.6.1 web application that uses the Ajax HTML Editor Extender. The editor works fine on my PC, but on a user's PC, the highlighting doesn't work. I've verified this with my own ...
0
votes
1
answer
21
views
How to Edit a record through JS and AJAX using .NET 6 and DATATABLE
I am trying to edit a record that is displayed in the datatable through javascript.
My idea is to edit a table record with javascript. I understand that tags helper are not used in this case and that ...
0
votes
1
answer
49
views
How to get client domain name or client IP Address which is trying to call web api in web api
I'm doing one project in Web API, So I want to get the client domain name or client IP Address which is trying to call my Web API.
Is there any way to get the same.
I'm waiting for your valuable ...
0
votes
1
answer
45
views
Send button value with Ajax to Controller in .net core
I'm going crazy trying to figure this one out.
First, I'm using entity framework and models etc. So, in my view I'm looping through all my objects, every object has unique properties - one of these ...
0
votes
0
answers
14
views
Ajax doesn't invoke the url path in controller
function UpdateSubCategoriesList() {
var SelectedCategory = document.getElementById("ddlCategories").value;
$list = $('#divSubCategoriesList');
$.ajax({
...
0
votes
0
answers
25
views
How to add the scrollX and scrollY in multi-series Line Chart
I'm not sure how to add the scrollX and scrollY in multi-series Line Chart but I added in jQuery like scrollX: true, scrolly: 300, and it is not working.
Below is my .aspx and .cs code
.aspx code is:
...
0
votes
0
answers
32
views
C# MVC partial view only updates after another button is pressed
So I'm pretty new to C# MVC, so I've been trying to recreate the game minesweeper into a web app for practice. I've been creating right and left click actions, and when I left click, my gameboard ...
0
votes
1
answer
31
views
ajax autocomplete does not in updatepanel and modal pop up
I have an Ajax autocomplete Textbox in modal and modal is located in updatepanel, This code works properly outside the modal But it does not work when located in modal ,I think there is a problem in ...
0
votes
0
answers
21
views
How do I send my File to ASMX Handler via AJAX so I can manipulate it -VB NET
Basically I want to pass the file I'm uploading via HTML and sending by AJAX but for now I tried with HTTP CONTEXT but something I did wrong and it wasn't working.
I was able to pass through an Object ...
0
votes
0
answers
28
views
Insert SQL with array
I have an array called svg. I want to insert this array into the database with ajax - how can I do the controller part of it? SQL also has 9 columns and I must insert SQL this columns
public void ...
0
votes
1
answer
36
views
How to keep propery name in JSON result same as Entity property without JsonPropertyName?
I have around 30 entities. I use ajax call to retrieve data from database using entity framework.
We have requirement to use the the same column name as in database's table.
However ajax get the ...
0
votes
1
answer
37
views
Ajax AutocompleteExtender not fetching data from SQL Server?
I'm trying to create a search field with autocomplete based on the database using Ajax AutoCompleteExtender, and when I run the code it fetch nothing but a weird letters shows in the search list.
In ...
-1
votes
1
answer
29
views
Nested model properties value null
I have below class which contains nested model property
public class TestClass
{
public string DropdownControlHtml { get; set; }
public TestClass1 TestClass1 { get; set; } = new();...
-1
votes
1
answer
29
views
What is happening when i pass a date string as response to the Jquery Ajax Call from WebMethod
I attempted to pass a date as a response from the webmethod via a jquery AJAX call. and the time is in GMT/UTC format oct 26 2021 12:01 am. However, the AJAX response contains /Date(1635264118393)/, ...
0
votes
1
answer
91
views
How To Call Json API from C# Useing Javascript
I made this Web API Apllication Using ASP.NET und C#
and output response from this API is Json object To can in java script Application Call this API with Ajax
this is C# Code :
public string Get()
...
0
votes
2
answers
109
views
I'm trying To Send Array with Serialize Form as a parameter from ajax to controller but the second parameter "test" giving null value
$("#CreateDepartmentForm").submit(function (e) {
e.preventDefault();
var modelx = $(this).serialize();
console.log(modelx);
var cars = [
{
...
0
votes
0
answers
10
views
I want to save data in two different tables with linq and ajax post
I want to save data in two different tables with linq and ajax post, and if you can help me about the way I should follow when I send it to the controller, I would be very grateful to everyone. I do
...
-1
votes
1
answer
85
views
Passing data to stored procedure in MVC using jquery
I'm new to Jquery. I want to pass data to my SQL database via Ajax.
Inside the Controller:
GetCountry Method Gets list of countries from the database proc
public JsonResult GetCountries()
{
...
0
votes
0
answers
35
views
How to redirect or hit webservice method using handlers asp.net
I have created a one custom handler for redirect to new files in asp.net application. Page redirection was working fine but post method(Ajax) redirection not hitting that method. I attached my code ...
0
votes
0
answers
27
views
Ajax call not sending data to controller
I have some ajax calls that call partials views on my controller and they work fine in most cases but then every now and then they stop sending data up to the controller even though the variables ...
0
votes
2
answers
114
views
Using AJAX to post to ASP.NET C# controller
I am trying to send a JSON object like so (I copied the object from the console, and I know the format is off a little) from the view to the controller in ASP.NET.
const obj = {
_405: {ratingID: '...
0
votes
1
answer
159
views
how to get the model list from ajax post call to post handler method in asp.net core razor page
I'm trying to get the model list from the ajax post call to post handler in asp.net core razor pages, I implemented the model and model list first. Later in ajax call I created the model array list ...
0
votes
0
answers
61
views
How can I get value from dynamic ID value html in chart.js by using javascript
I have a dynamic ID value from ajax and display in HTML by tag h2. Now i want to get data and put it into data of Chart.js . I don't know the syntax to get it. Could you help me to edit my code in ...
0
votes
0
answers
88
views
Unable to cast object of type 'CustomHandler' to type 'System.Web.UI.Page'
I have created one custom handler for redirect old asp.net page to new page. after redirection below error is accrued. please help me to fix this issue.
enter image description here
public void ...
0
votes
2
answers
33
views
RedirecToAction doesnt call the expected view
I have successfully created a product but the page doesn't redirects to the view I want...and I don't really know why...
[HttpPost]
public async Task AddProduct([FromForm] AddProductViewModel model)
...
0
votes
0
answers
142
views
Thousands of ajax call in a loop produces "Failed to load resource: net::ERR_INSUFFICIENT_RESOURCES" error
I'm trying to loop through all bonus lines (usually there are thousands of them) to approve each one in the ajax call. The reason I didn't do a "approveAll" method is because each bonus ...
1
vote
1
answer
167
views
Pass a variable from a view to a controller action method and then to another method in the same ASP.NET MVC controller
One of my views get a token from an API when customer places an order. I would like to pass that token variable to an action method in a controller. Once it gets to that action method I need to pass ...
0
votes
0
answers
169
views
ASP.NET Core MVC, jQuery, Ajax, Javascript, html - problem with retrieving data to view via api controller in json
EDIT:
In the getJSON is executed get request which looks like for example:
https://localhost:44338/api/lazyloading?id=undefined&quantity=2&filterName=Odziez.
Even if I set last = 1; It does ...
1
vote
0
answers
40
views
How to configure jQuery.Lazy() Plugin to load/fadein images after Partial Page AJAX retrieve in ASP.NET Core Razor Pages
I'm trying to use .lazy() to fade in images retrieved from the DB via AJAX. On a simple page (without AJAX call), the image fadein works great. But when I use a Partial Page/AJAX to retrieve the image ...
0
votes
2
answers
48
views
AJAX sending data to backend C# issue
Presently I am having the issue of trying to pass information back to the behind code, in this case a user selected name from a list. I have tried setting the data VN to an object and passing that, ...
0
votes
0
answers
94
views
How to open an other DataTable when click on Details button on a row of DataTable in asp.net core
I want to open an other table when click on detail button to fetch details info.
my two table separately work fine but When I pass a parameter in code behind the second table bring no data. Detail ...
0
votes
1
answer
30
views
@Ajax.ActionLink redirects to previous page instead to send data to controller
I have @Ajax.ActionLink call by which I am trying to pass data to controller and refresh partial view. When I click on the link instead of passing the data to the controller, it is redirecting me to ...
0
votes
0
answers
10
views
How to add different type of validations for a looped questions
I'm using a form to update certain values from a single table, the column headings of the table are Id, DisplayField, ValueField. in that table there are 3 records like phone, email, name under ...
0
votes
0
answers
41
views
Uncaught SyntaxError: Unexpected token S in JSON at position 5
How can I solve this error?
And how can I define a variable in the AJAX function and use it outside of the AJAX function?
cshtml:
var file_name = '';
var inputs = ...
0
votes
2
answers
36
views
I can't pull data from ajax
public enum SocialEnum
{
[Display(Name = "Genel")]
General,
[Display(Name ="Teşekkür Et")]
Thanks
}
public class SocialMedia : Entity<...
0
votes
3
answers
122
views
Ajax link does not send POST request
I have the following ajax link:
@Html.AjaxActionLink(item.Name, "https://test.testspace.space/storage/Data/stream?tokenValue=e58367c8-ec11-4c19-995a-f37ad236e0d2&fileId=2693&position=0&...
0
votes
0
answers
142
views
updated data not loading in datatable only showing after doing F5 in ajax jquery mvc form
I have a cshtml page where I have datatable to display the data and a bootstrap pop up form via which I am doing insert and update operation. When the page loads, the data is displayed in datatable ...