Use jQuery AJAX in ASP.NET CORE 6? You NEED to see how it´s done!

preview_player
Показать описание

Learn HOW you can use JQuery AJAX in ASP.NET CORE 6! Want to learn more about C# and ASP.NET?

With JQuery AJAX you can directly send HTTP requests directly from JAVASCRIPT to a BACK END Endpoint in ASP NET CORE 6. Find out how in the video!

Here are some links that you may find interesting👀

We´ll make sure to make a Developer out of you In no time!

And we promise to create more cool content for you!

The jQuery library has a full suite of Ajax capabilities. The functions and methods therein allow us to load data from the server without a browser page refresh.

Ajax gives us the possibility to perform an asynchronous HTTP (Ajax) request.

Timestamps:
00:00 - 00:31 - Intro
00:31 - 02:04 - HttpGet and HttpPost attribute
02:04 - 02:25 - ASP.NET Course
02:25 - 03:42 - Setting up Scripts section
03:42 - 05:37 - Ajax GET
05:37 - 07:00 - Ajax POST
07:00 - 08:01 - Testing the Endpoints
08:01 - 08:19 - Outro

What is AJAX?
AJAX = Asynchronous JavaScript and XML.

In short; AJAX is about loading data in the background and display it on the webpage, without reloading the whole page.

Examples of applications using AJAX: Gmail, Google Maps, Youtube, and Facebook tabs.

You can learn more about AJAX in our AJAX tutorial.
What About jQuery and AJAX?
jQuery provides several methods for AJAX functionality.

With the jQuery AJAX methods, you can request text, HTML, XML, or JSON from a remote server using both HTTP Get and HTTP Post - And you can load the external data directly into the selected HTML elements of your web page!

Without jQuery, AJAX coding can be a bit tricky!

Writing regular AJAX code can be a bit tricky, because different browsers have different syntax for AJAX implementation. This means that you will have to write extra code to test for different browsers. However, the jQuery team has taken care of this for us, so that we can write AJAX functionality with only one single line of code.

Is Jquery and AJAX the same?
AJAX is a web development technique for making asynchronous calls to the server. jQuery is a JavaScript library for designing and make some web development tasks easy. It makes it possible to run javascript outside of the browser. It works on the browser or outside the browser also

What is ASP.NET?
Free. Cross-platform. Open source.
A framework for building web apps and services with .NET and C#.

ASP.NET is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name stands for Active Server Pages Network Enabled Technologies.

It was first released in January 2002 with version 1.0 of the .NET Framework and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET language. The ASP.NET SOAP extension framework allows ASP.NET components to process SOAP messages.

ASP.NET's successor is ASP.NET Core. It is a re-implementation of ASP.NET as a modular web framework, together with other frameworks like Entity Framework. The new framework uses the new open-source .NET Compiler Platform (codename "Roslyn") and is cross platform. ASP.NET MVC, ASP.NET Web API, and ASP.NET Web Pages (a platform using only Razor pages) have merged into a unified MVC 6.

So, how do you use JQuery AJAX with ASP.NET 6? Check out the video to find out!

#aspnet #javascript #jquery #net #code #ajax #net6

TAGS

tutorialsEU offers you free video tutorials about programming and development for complete beginners up to experienced programmers.
This includes C#, Unity, Python, Android, Kotlin, Machine Learning, etc.
Рекомендации по теме
Комментарии
Автор

Big big thanks to you brother for providing such great content and tutorial to learn so much 😊. I am very glad to learn this and found it super effective and helpful in my use cases

kopilkaiser
Автор

I wish this tutorial was in depth and used a more likely scenario. Can't get an onclick button to find a function in the script tag, and moving the function to the site.js file makes the url for the controller action unreachable.

harrynewman
Автор

Execllent! Simple and parctical. Thank you!

OzOvadia
Автор

using ajax to fire off a partial view or view component is about the best thing ive found that isnt blazor server

chadgregory
Автор

Jannick you are the bomb, just like Oz said excellent, simple and practical, love it 🙂

AdnanAbbasi_LXXVIII
Автор

can u show us how to make a multipart/form-data ajax post?

Автор

Good video! Just one thing, a lot of video´s in general on youtube about programming, use hardcoded examples. It would be useful to make a video like this with userinput from a REST service. Its much more useful in the real world. Just a thought from a cs student :)

lassetvedegaardnyboe
Автор

thank you very much for this great video ❤😍

moeinvafapour
Автор

Doing this when the App is protected with AzureAd resuts in a cors error can you do a video or explain how to manage this?

daviddevon
Автор

How do I handle. Net date time convert to JQuery short date. I have been struggling with that any tips? Internet has been no help at all do I send from an ActionResult View Model?

duncanfirth
Автор

how do you have jQuery intellisense working?

kriskata
Автор

I am getting error: Object 'error' DOMException: Failed to execute 'open' on 'XMLHttpRequest': '/HOME/GETNAMES' is not a valid HTTP method.

borislavenchev
Автор

Can anyone explain a bit more on the @await RenderSectionAsync("Scripts", required: false)? So far I just have noticed that without including my scripts in the @section Scripts{}, jquery doesn't work!

DaniLearnsIT
Автор

Hi, this example demos absolute minimum information and is NOT a useful example at all. It cannot help a beginner to code it. I think it’s only to advertise your courses ?

getsmartpaul
Автор

Can you demo crud using AJAX and don't use Html helper . And Controller like this
Public async task<IActionResult>Name(){

return ok();
}

nangdalet
Автор

jQuery in 2022/2023 is like using a rusty carving knife to do surgery...

vargr