Question regarding Microsoft jQuery plugin for Unobtrusive Ajax
Questions tagged [unobtrusive-ajax]
107 questions
1
vote
1 answer
How to implement data-ajax-confirm with sweetalert using Unobtrusive Ajax?
Given the form ajax like this
1
vote
2 answers
.Net Core 3.0 AJAX POST Body Always Null
I've recently converted my project from .Net Framework 4.7 to .Net Core 3.0. I'm having trouble getting my AJAX post to work.
Here is what's working in .Net Framework 4.7:
View:
@using (Ajax.BeginForm("Save", "Controller", new AjaxOptions() {…

mint
- 3,341
- 11
- 38
- 55
1
vote
1 answer
Razor Pages ASP.NET unobtrusive ajax Post partial update
I'm trying to update only part of my page from a partial View.
It works perfectly fine if i use this
Click heeeeeeeere
But this is a…

DFENS
- 289
- 1
- 12
1
vote
2 answers
Is it possible to pass a parameter/single form element to a controller via unobtrusive AJAX in ASP.Net Core?
I've got a ASP.Net Core MVC app and I have the need to have certain elements update on a click. For example, a create a person form that searches for an existing address.
I know that I can't use nested forms, However, by going back to my knowledge…

Dev X
- 89
- 9
1
vote
0 answers
Clicking Ajax.ActionLink Produces a GET and a POST
Clicking a certain Ajax ActionLink in this app I just inherited produces a POST request AND a GET request (POST and then a GET immediately after). The first request hits the HttpPost method on the server, but the second request (the GET) throws a…

CJ314
- 71
- 2
- 3
1
vote
0 answers
ASP.NET core (VS code) how to install Unobtrusive Ajax library
I am using Visual Code and would like to install Unobtrusive Ajax library. In Visual Studio, Unobtrusive Ajax library can be installed via Nuget. However, I cannot find a way to install Unobtrusive Ajax library in VS code.

Pardeep
- 161
- 2
- 10
1
vote
1 answer
Stop previous unobtrusive ajax call
I have a form like :
@using (Ajax.BeginForm("List", null, new AjaxOptions() { UpdateTargetId = "results" }, new { id = "myform" }))
{
}
I declare javascript to send submit when user presses a key in…

GGO
- 2,678
- 4
- 20
- 42
1
vote
0 answers
Returning BadRequest in ASP.Net Core MVC to Microsoft jQuery Unobtrusive Ajax post has ModelState undefined
THE PROBLEM
I am trying to return service side validation errors from ModelState using BadRequest(ModelState) but when I try to assign the the jQuery ModelState from xhr.responseText I am getting undefined error in javascript. I am using ASP.Net…

OjM
- 1,029
- 2
- 17
- 32
1
vote
1 answer
Conflict between unobtrusive-ajax and jQuery
I have an MVC4 project where I've used NuGet to install jQuery 3.1.0 and Microsoft.jQuery.Unobtrusive.Ajax 3.2.3. My bundle is this:
bundles.Add(new ScriptBundle("~/bundles/scripts").Include(
"~/Scripts/jquery-3.1.0.min.js",
…

BKahuna
- 601
- 2
- 11
- 23
1
vote
0 answers
MVC C# PagedList - PagedListPager passing parameters
I have a paged list using unobtrusive ajax that looks like this.
@Html.PagedListPager(Model, page => Url.Action("Images", "Admin", new { imageLibrary = image.ImageLibrary, page }),
PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing(new…

mbuchok
- 391
- 6
- 18
1
vote
0 answers
ASP.NET MVC Ajax.BeginForm file upload not being unobtrusive
I have the following in my View
@using (Ajax.BeginForm("UploadAdditionalImage", "Image", "UploadAdditionalImage", ajaxOptions, new { enctype = "multipart/form-data" })) {

Wayfind3r
- 23
- 4
1
vote
1 answer
How to extend Microsoft jQuery Unobtrusive Ajax without changing jquery.unobtrusive-ajax.js file?
jquery.unobtrusive-ajax.js looks like the following:
I would like to add the following event to the library so that I can use asyncRequest() function but in a different file.
$(document).on("change", "select[data-ajax=true]", function (evt) {
…

Amit Hasan
- 1,430
- 1
- 15
- 33
1
vote
2 answers
How to remove DOM element after ajax request with unobtrusive-ajax?
In the callback function "OnSuccess",i can't get the element which i've clicked.
After click the "Del" button ,i try to remove the "tr" element which one the "Del" button in that i just clicked.how to do this?

developer.zheng
- 11
- 3
1
vote
1 answer
AJAX Form redirects instead of updating target
I know this question has been asked a lot and I have tried every solution I can find but I still cannot get my Ajax form to update the DIV rather then redirecting to the Action Method e.g(Local..Home/Index_AddUser). I have shortened the code as it…

hjardine
- 495
- 3
- 17
1
vote
1 answer
Calling javascript function on OnSuccess callback of Ajax.actionlink?
I am using MVC5. I am loading images from a list using Unobtrusive Ajax.ActionLink(). Here is the sample code:-
-
@foreach (var item in Model)
{
- @Ajax.ActionLink(@item.Name, @item.Action, …

user1327064
- 4,187
- 5
- 20
- 30