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

Поделиться
HTML-код
  • Опубликовано: 13 июл 2024
  • 🚀 C# Progress Academy - Become a senior C# developer: academy.tutorials.eu/p/csharp...
    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👀
    · Check out the C# Masterclass: bit.ly/38xC6WW
    · FREE C# Download 9 MUST have .NET Developer tools: page.tutorials.eu/tools
    We´ll make sure to make a Developer out of you In no time!
    ☕ You can also support us now by buying us a coffee! ☕ www.buymeacoffee.com/tutorialsEU
    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, RUclips, 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
    asp.net core ajax,asp.net ajax,asp.net jquery,jquery ajax,asp.net 6 ajax,asp.net 6,asp.net 6 mvc,asp mvc ajax,asp jquery,asp javascript ajax,assp.net mvc ajax,asp.net mvc jquery,asp.net core mvc ajax,asp.net core mvc jquery,ajax,jquery,mvc,jquery ajax tutorial,asp.net core,asp.net mvc,csharp,jquery ajax asp.net core 6,javascript,javascript tutorial,json,jquery tutorial,ajax tutorial,what is ajax,programming,code,visual studio,dotnet,asp net core
    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.
    Stay tuned and subscribe to tutorialsEU: goo.gl/rBFh3x

Комментарии • 28

  • @tutorialsEUC
    @tutorialsEUC  2 года назад +2

    🚀C# Progress Academy - Become a senior C# developer: academy.tutorials.eu/p/csharp-progress-academy

  • @OzOvadia
    @OzOvadia Год назад +1

    Execllent! Simple and parctical. Thank you!

  • @AdnanAbbasi_LXXVIII
    @AdnanAbbasi_LXXVIII Год назад

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

  • @harrynewman1744
    @harrynewman1744 2 года назад +7

    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.

  • @chadgregory9037
    @chadgregory9037 2 года назад +3

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

  • @tutorialsEUAndroid
    @tutorialsEUAndroid 2 года назад +3

    Let's go!

  • @moeinvafapour5440
    @moeinvafapour5440 2 года назад +1

    thank you very much for this great video ❤😍

  • @lassetvedegaardnyboe7084
    @lassetvedegaardnyboe7084 Год назад +1

    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 :)

  • @latestautonews6016
    @latestautonews6016 Год назад +1

    Thanks. it is very usefull.

  • @duncanfirth
    @duncanfirth Год назад

    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?

  • @daviddevon
    @daviddevon Год назад

    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?

  • @improvefps
    @improvefps 2 года назад +4

    no link to source?

  •  2 года назад +3

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

  • @borislavenchev5051
    @borislavenchev5051 Год назад

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

  • @kriskata7653
    @kriskata7653 7 месяцев назад

    how do you have jQuery intellisense working?

  • @user-nf9he3vm8d
    @user-nf9he3vm8d 10 месяцев назад

    where I can get code for this video?

  • @codetech1165
    @codetech1165 Год назад +1

    brill

  • @DaniLearnsIT
    @DaniLearnsIT 5 месяцев назад

    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
      @DaniLearnsIT 5 месяцев назад

      Figured it out! Your page is rendering in the _Layout right where the @RenderBody() is placed. This is in the middle of the layout. This means that whatever you have in your page gets inserted here, Including your block. Because it is in the middle, your script block gets inserted BEFORE you declare the use of jquery! The @await RenderSectionAsync("Scripts", required: false) makes it so if you have a section called Scripts, it renderes it AFTER the declaration of Jquery(because you are placing that line of code after the declaration of jquery).
      Pretty much, your block gets rendered below the because of @await RenderSectionAsync("Scripts", required: false). If you don't use the @section Scripts{}, it gets rendered above , which makes it so your scripts have no idea of what jquery is.

  • @nangdalet5994
    @nangdalet5994 2 года назад

    Can you demo crud using AJAX and don't use Html helper . And Controller like this
    Public async taskName(){
    ----------------------
    return ok();
    }

  • @getsmartpaul
    @getsmartpaul Год назад +1

    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 ?

    • @tutorialsEUC
      @tutorialsEUC  Год назад

      Hi there, thanks for your comment. We would love to create another video on that topic if you tell us what we could improve.
      What is a useful example from your side of view?
      Greets

  • @vargr4730
    @vargr4730 7 месяцев назад

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

    • @csexton07
      @csexton07 4 месяца назад

      Not true, used it many admin like sites. Sure customer facing, id probably agree in most scenarios. Ive used it in so many prototypes.

  • @pietrononame4945
    @pietrononame4945 Год назад +3

    I hate jQuery.