Category - AJAX
Results 16 - 20 of 337
29 Jan 2021 29 Jan 2021 0 Comments  1330 Views
Here Mudassar Ahmed Khan has explained with an example, how to use AntiForgeryToken with jQuery Unobtrusive AJAX in ASP.Net Core Razor Pages.

The jQuery Unobtrusive AJAX library does not support adding headers to the request and hence it is not possible to send AntiForgeryToken.

Thus, the possible way is to make use of normal jQuery AJAX function and then send the AntiForgeryToken by adding it to the request headers.
29 Jan 2021 29 Jan 2021 0 Comments  1969 Views
Here Mudassar Ahmed Khan has explained with an example, how to use jQuery Unobtrusive AJAX in ASP.Net Core Razor Pages.

The POST method of the Razor Page will be called using jQuery AJAX Unobtrusive library and JSON from HTML in ASP.Net Core.
13 Jan 2021 29 Apr 2021 0 Comments  5720 Views
ASP.Net  AJAX  jQuery  MVC  Core
Here Mudassar Ahmed Khan has explained with an example, how to submit (post) a Form and send data from View to Controller using jQuery AJAX in ASP.Net Core MVC.

This article will explain how to create Form Fields and then send data from View to Controller using Form Collection and jQuery AJAX in ASP.Net Core MVC.
31 Dec 2020 31 Dec 2020 0 Comments  3722 Views
Here Mudassar Ahmed Khan has explained with an example, how to set ViewBag using JavaScript or jQuery in ASP.Net MVC Razor.

ViewBag is created on Server Side of the Web application and hence it is not possible to directly set it on Client Side using JavaScript or jQuery.

Thus, only possible way is to set it by making an AJAX call to the Controller’s Action method using jQuery AJAX function in ASP.Net MVC Razor.
31 Dec 2020 31 Dec 2020 0 Comments  2377 Views
Here Mudassar Ahmed Khan has explained with an example, how to set ViewData using JavaScript or jQuery in ASP.Net MVC Razor.

ViewData is created on Server Side of the Web application and hence it is not possible to directly set it on Client Side using JavaScript or jQuery.

Thus, only possible way is to set it by making an AJAX call to the Controller’s Action method using jQuery AJAX function in ASP.Net MVC Razor.
Results 16 - 20 of 337