jQuery Ajax CRUD in ASP.NET Core MVC using Popup Dialog

Поделиться
HTML-код
  • Опубликовано: 1 окт 2024
  • 🍒 Related Videos
    Asp.Net Core MVC CRUD Operations: • Asp.Net Core MVC CRUD ...
    Expense Tracker App in Asp.Net Core MVC: • Build an Expense Track...
    MVC Login & User Registration: • Asp.Net Core MVC & Ide...
    CRUD without EF in Asp.Net Core MVC: • CRUD without Entity Fr...
    Image Upload in Asp.Net Core MVC: • Asp.Net Core MVC Image...
    More MVC Tutorials: • Asp.Net Core MVC Tutorial
    📂 GitHub Repository
    ► bit.ly/33KTJAu
    💖 Channel Support
    ➤ Paypal: bit.ly/3L36ut4
    ➤ UPI App: geni.us/ScanQR...
    ➤ Amazon: geni.us/Amazon...
    💌 For Business Inquiries
    ➤ codaffection@gmail.com
    🚶‍♂️ Follow us
    Facebook : / codaffection
    Discord : / discord
    Twitter : / codaffection
    ---
    All about jQuery Ajax CRUD in ASP.NET Core MVC using a Modal Popup Dialog
    In this tutorial, we've implemented jQuery Ajax CRUD in ASP.NET Core MVC using Modal Popup dialog. Today, these types of user interface/ methods are used in enterprise applications so that we can avoid reloading the page to do operations on a single controller.
    Context discussed :
    - MVC Controller with CRUD Operations with EF Core.
    - Open the form in the Modal Popup Dialog.
    - Submit the form with the jQuery ajax post.
    - Show loading spinner while waiting for request-response.
    - etc
    #jQueryAjax #AspNetCore #CodAffection

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

  • @CodAffection
    @CodAffection  4 года назад +3

    goo.gl/bPcyXW : Buy me a Coffee
    bit.ly/36IA1cH : AspNet Core MVC CRUD
    bit.ly/3Pn2S7y : Expense Tracker App in AspNet Core MVC
    bit.ly/403lUVC : MVC Login & User Registration
    bit.ly/3muhseC : CRUD without EF in AspNet Core MVC
    bit.ly/39B6xdh : Image Upload in AspNet Core MVC
    bit.ly/30fPDMg : More MVC Tutorials

    • @kaisonduncan7151
      @kaisonduncan7151 3 года назад

      you all probably dont care but does someone know of a method to log back into an instagram account..?
      I was dumb lost my login password. I love any assistance you can offer me!

    • @emmitttroy8477
      @emmitttroy8477 3 года назад

      @Kaison Duncan Instablaster :)

    • @kaisonduncan7151
      @kaisonduncan7151 3 года назад

      @Emmitt Troy thanks so much for your reply. I found the site through google and I'm in the hacking process now.
      Looks like it's gonna take quite some time so I will reply here later with my results.

    • @kaisonduncan7151
      @kaisonduncan7151 3 года назад

      @Emmitt Troy It worked and I now got access to my account again. Im so happy!
      Thanks so much you really help me out!

    • @emmitttroy8477
      @emmitttroy8477 3 года назад

      @Kaison Duncan You are welcome :D

  • @Max1GameChannel
    @Max1GameChannel Год назад +6

    25:28 - ctrl+f5 - reloads the current page including the browser cache. It's called Hard reload. It means that the browser will not use the current cache but will be forced to download again all the files (js files, images, scripts, …). You will have the most fresh version of the page sent by the server.

  • @syedsharfuddin3246
    @syedsharfuddin3246 4 года назад +5

    @codAffection First of all Great Video Sir !!! , There is a Small Bug in it After Editing a row ,It stores the Values Of the row which Edited , so if we Click New transaction its Opening with the filled Value in it of Edited row ...
    solution = >

    • @dustywright2021
      @dustywright2021 4 года назад

      I also had the same issue. The fix worked for me as well. Thank-you.

    • @CodAffection
      @CodAffection  4 года назад

      Thanks for the update.

    • @ajaysingh0426
      @ajaysingh0426 3 года назад

      Great @Syed your solution fixes the bug.

    • @lescinqlune
      @lescinqlune 3 года назад

      Thank you Syed for the update, it works!

  • @bravedeveloper
    @bravedeveloper 2 года назад +6

    The project has a bug, after updating a record if you press New transaction button the modal loads the last edited record, but to solve it just update the for New transaction passing an Id=0 instead of null. The anchor could be like this:
    Nueva Transacción
    Regards. Good content btw!! congratulations CodAffection! 👍

  • @meysamghanavati5526
    @meysamghanavati5526 4 года назад +5

    Thank you for this tutorial, please add pagination in table.. (without exist component for example datatable or etc..) - please implement 0-100 in this project. I hope you should so happy :)

  • @anilkorutla4600
    @anilkorutla4600 4 года назад +1

    Validations are not working In AddOrEdit.cshtml

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

    Oussama May 9, 2020 at 4:26 am - Reply
    When i click update and save new informations, then reclick for Add popup (should be empty), I found weirdly filled with the last element updated…
    when I checked the html code i find the URL.Action of new(Add) contain in route values the id of last updated…
    How this is possible? and how i can fix it
    Salim Bozkurt May 29, 2020 at 2:54 pm - Reply
    Hi. Same problem. there is no problem when I use just string url. But when if I use Url.Action there occurs a problem.
    After the any update proccess, New transaction button’s url contain last route values.
    why ? I think problem is about RenderRazorViewToString helper.

    • @marilu9138
      @marilu9138 4 года назад

      same, did you resolve it ?

    • @salimbozkurt9617
      @salimbozkurt9617 4 года назад +1

      @@marilu9138 No but, I noticed that if I use the url action just like as below, there no occurs problem. I used id=0 instead of null.
      @Url.Action(“AddOrEdit”,”Product”, new {id=0}, Context.Request.Scheme)

    • @marilu9138
      @marilu9138 4 года назад +1

      @@salimbozkurt9617 thanks , i was using only 0, i Will try later

    • @jimmydavila7196
      @jimmydavila7196 4 года назад

      @@marilu9138 Yepe. It works. Thanks, I had the same problem

  • @Aman-mt2kr
    @Aman-mt2kr 4 года назад +2

    your an Amazing bro our country does not have any pay-pall so i cant... is there a source code for this

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

    Really amazing 😍,
    very very useful video 👍👍🎉
    Very well explained 🤩🤩

  • @hadiboukdir
    @hadiboukdir 4 года назад +3

    Why does my Index page not showing the updated data after I submit the form. I always need to refresh the page then I can see the changes!?

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

    Thank you for this job, it was amazing. Can you do another similiar without using the helpers?

  • @testingtesting400
    @testingtesting400 4 года назад +1

    I'm getting a problem when using helper class with "TagHelper". It's doesn't render the page to string and return empty html when a tag helper is present in the returning view .
    Did any one else encounter the problem ???

  • @ashraf6850
    @ashraf6850 3 года назад

    Hello sir without scaffolding crud operation banao asp.net MVC EntityFramework please sir

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

    Its very nice way of explanation . If you don't mind I have few question which make me confuse 1. is this a good practice to have interface for repository ? or the way you deal with EF please explain Regards

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

    @CodAffection Kindly help me this out if you know about this, i am getting error when i am creating a controller as same you were creating
    Error There was an error running the selected code generator: 'Package restore failed. Rolling back package changes for 'CrudCoreWithAjax'.'

  • @VeasnaMUCH
    @VeasnaMUCH 4 года назад +3

    That is a very great tutorial. I have learn alot from yours, by the way if I would like to add pagination feature in _ViewAll.chtml partial view, how could we do?

    • @tunghinh5954
      @tunghinh5954 3 года назад

      I also want to ask???????????

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

    thank you

  • @k1army01
    @k1army01 4 года назад +1

    Hello, thanks for your contribution,
    I have a small inconvenience, the Json response is arriving empty, why is that problem.
    Helper.RenderRazorViewToString (this, "_ViewAll", _context.Processes.ToList ()).
    for this reason the index is empty, and I have to refresh the page to show the list.

  • @issaseckkane
    @issaseckkane 11 месяцев назад

    Hello sir, lot of thanx for this important tuto in Ajax, every things works normally but i have one Remark in my case After doing an update for one record the add new Buton Open The modal with the last One populated in the form instead of permiting to add new transaction. Thx

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

    modal('show') not working as per the tutorial. Driving me crazy and the online documentation is incomplete. Guess why?!

  • @kritikyorumer
    @kritikyorumer 3 года назад +1

    Thanks!

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

    Hello, the submit button updates table and brings it "inside" the modalpopup! I've tried to google and followed everything you did but it seems like I am missing something?? any help in this regard?

  • @assistantlabourcommissione4496

    I practice this project and i did not add anything new to it but when i click to submit or check the validation , it prints whole AddorEdit file and other information on the browser .... all the code is same as yours... What could be the issue , please help.

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

    In 37:00 , I am doing my project through ADO.NET connection. Same procedure used to implement. How to write the code in json object redirection in ADO.NET connection. In my project I am using IConfuguration. In your project updated model i.e -context.Transactions.ToList() is used.
    My project this code not work. After create new transaction then submit it is not redirect to index page. Please reply.

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

      Is there any error message?

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

      @@CodAffection No. But it doesn't redirect. I have used
      return Json(new {isValid = true, redirectToUrl = Url.Action("Index, Book")});
      this return statemet used and also change jquery. Now my code is work.

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

      @@alwaysprudvi Thanks for the update, it might be due to the framework version update. good try. happy coding.

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

      @@CodAffection Thank you for your videos. Upload the more videos on .NET.

  • @yalcinbilisim
    @yalcinbilisim 3 месяца назад

    Hello, which version of Visual Studio 2019 gives errors?

  • @godfreykuboi6809
    @godfreykuboi6809 3 года назад +1

    This good video, however am getting this error on the POST function. "TypeError: 'append' called on an object that does not implement interface FormData." I have done everything according to your video. Please help get solution to this error.

    • @godfreykuboi6809
      @godfreykuboi6809 3 года назад

      Oh boom! Got the solution, it was typo error....Thanks alot CodAffection for wonderful tutorial

  • @jhonhernandez9210
    @jhonhernandez9210 4 года назад +1

    No source code?

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

    how to make validation errors disappear after leaving the input (as normal ) without posting the form ??
    also, if the form has a dropdownlist it lost it's function after posting the form with error

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

    Sir When i add data its not showing in Table ===> after referesing page its coming ===> Please Help me

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

    Every thing is Working just data is coming in table after referesing Page .... don't know whats going on

  • @omarbedoui5292
    @omarbedoui5292 4 года назад +1

    Thank you for this wonderful tutorial,
    download does not exists

  • @MCAntMonk615
    @MCAntMonk615 4 года назад +1

    How to create a messenger app using asp. Net mvc

  • @rayt6867
    @rayt6867 4 года назад +1

    Can you please share the css, thanks

  • @omarayub1295
    @omarayub1295 4 года назад +1

    best tutorial I learned all basics of .net from your videos ... highly recommended........ please upload more

  • @muhammadsaqib-bi7vp
    @muhammadsaqib-bi7vp 3 года назад

    where is the code of this project????? found anyone??????

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

    In this method how can I use already created table from sql database?

  • @bolajibello8917
    @bolajibello8917 4 года назад +3

    Thanks for the job well done. your style of handling jQuery ajax is so superb, I have adopted that style from you long time ago. You are surely among the best tutors on youtube

    • @CodAffection
      @CodAffection  4 года назад +3

      Thanks for your wonderful feedback. keep learning and sharing.

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

    sir how to load Category and brand drop dwon Model in this Model getting null dropdwons

  • @mayurkalsekar524
    @mayurkalsekar524 16 дней назад

    36:00 thanks for uploading this video , I have been searching for such indepth validation using modal

  • @chanakyakhatri5194
    @chanakyakhatri5194 4 года назад

    hi sir , i am actually making a shopping cart kind of project , can you please make a tutorial on shopping cart on ASP.NET CORE and ANGULAR it will be a great help,
    thankyou

  • @tunghinh5954
    @tunghinh5954 3 года назад

    Sir, I use @using X.PagedList.Mvc.Core; @using X.PagedList; for project, But it doesn't work, there is a solution for paging.

  • @erik_lopez_
    @erik_lopez_ 3 года назад

    There is a bug in the code, when you update a transaction the information keeps saved and then when you clic on NEW TRANSACTION the information saved doesnt let you create a new transaction, please how can I fix this problem???

  • @vib1336
    @vib1336 3 года назад

    Why contentType in the jquery post function is false? It shouldn't be - application/x-www-form-urlencoded?

  • @abderrahmenalhelaoui5813
    @abderrahmenalhelaoui5813 4 года назад

    we can't access to this link bit.ly/3e1oXpQ

  • @ramchandrathakkar2022
    @ramchandrathakkar2022 4 года назад +1

    Very Informative. Liked it a lot. During this lockdown will watch all the videos to update my knowledge.

  • @knightrider333
    @knightrider333 4 года назад

    You change pages too fast, even before I could read your code. Difficult to follow for first time learners. when you are writing a code, give 5-10s to read it. Or else I have to keep stopping and playing the video.
    You took hidden field for Transaction ID so how is it getting populated by default? I used Identity in the table but getting error while submitting the data.

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

    Thank you for this great effort ^_^ , but how to append a file in jQueryAjaxPost function?

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

    This is very helpful tutorial, Only thing we are not able to convert _viewall into data table ajax call, after save record view is unable to reload, its stuck and once we refresh its appears please advise. Otherwise this is a complete tutorial to implement in real life project. Its a humble request.

  • @imyours4733
    @imyours4733 4 года назад

    pls reply can we do the same in asp.net ??????
    or can you make video on asp.net using popup with jquery..........
    pls reply

  • @OnlineZiggasa
    @OnlineZiggasa 4 года назад

    Great. I need Web Api 2 Registration and Password Email Confirmation Tutorial!!!

  • @MdShuvo-ok6qe
    @MdShuvo-ok6qe Год назад

    very nice tutorial thanks

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

    AWEEESOME..Post thax a lott

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

    Please without EF Core

  • @NoorASalam-ik1mt
    @NoorASalam-ik1mt 4 года назад

    Hi... I had a problem with update it's not work every time I try to update it's insert as new record ... I follow your steps and use your source code in your website article ... can you help please?

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

    Thank you very much sir. at 36.38, what if I want to return to a different controller instead of "this", how do I put the controller in place of the "this" keyword

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

    😀👍

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

    could you help me I do like this video but I want to add dropdown list from other relation table (rather than display the id Idisplay

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

      did you watch my master detail videos? where I have discussed such topics.

  • @Виталий-к9ь
    @Виталий-к9ь 3 года назад +1

    Лучший 🔥
    Огромное спасибо 👍

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

    Comprehensive explanation. Thanks for knowledgeable sharing.

  • @engr.malikmuhammadmubashir6828
    @engr.malikmuhammadmubashir6828 4 года назад +1

    Super awesome video. I had been waiting for this for a long time. One request though. How can we implement jQuery DataTables in this?

    • @CodAffection
      @CodAffection  4 года назад

      we've covered that in one previous tutorial, it should work.
      ruclips.net/video/_qIYBgWTlTo/видео.html
      ruclips.net/video/u147Q0NY6Qg/видео.html

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

    Nice, tks video help me

  • @abdullahquhtani4247
    @abdullahquhtani4247 4 года назад

    Do you work as freelancer? Plz reply.

  • @salimbozkurt9617
    @salimbozkurt9617 4 года назад +1

    How to implement client side (unobtrusive) validation or best fluent validaiton ? I tried but i couldn't run, please help me ?

    • @CodAffection
      @CodAffection  4 года назад +1

      I've discussed the same in one of my previous tutorial here - ruclips.net/video/DI_YppvLgJ8/видео.html
      Let me know if there is anything left explain.

    • @salimbozkurt9617
      @salimbozkurt9617 4 года назад

      @@CodAffection thanks. i solved my problem. i implemented fluent validation.

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

    Will it work in .NET 6?

  • @anandparmar07
    @anandparmar07 3 года назад

    popup not working

  • @carloskanika9466
    @carloskanika9466 4 года назад +1

    Thank you for this wonderful tutorial,
    I applied these codes in one of my projects, it works correctly but in my views (creation, modification) which opens in modal, the javascript code does not work.

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

      Make sure you have a reference to either the Bootstrap JS CDN or the downloaded local Bootstrap JS file in your _Layout view

  • @faizanhamza9339
    @faizanhamza9339 4 года назад +1

    great video

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

    Thank you very much. This video help me a lot in creating my site for student grade. Especially in teachers part of site because teacher has to add , edit and sometime maybe delete grades.

  • @itrabbi24
    @itrabbi24 3 года назад

    All Ok but when data insert modal not hide auto and after delete page not auto refesh

  • @Manithan123
    @Manithan123 2 месяца назад

    Excellent tutorial. Thank you!!

  • @lizahargoes778
    @lizahargoes778 3 года назад

    Hello i want to query that if we have multiple selectbox in for how can we get value from that in comma seperated ways

  • @remonemad7305
    @remonemad7305 4 года назад

    Kindly Source of this Code (Project File)

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

    Thank you

  • @samqureshi9415
    @samqureshi9415 4 года назад

    Bro . If I want to be a full stack web developer and I decide to build my first application on MERN stack . So React js is a libaray ! Is it necessary to learn (angular js ) a framework also . Or I can make web application without framework also . Library also works instead of framework. ???

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

    OutStanding Yaaar..

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

    Great work and quick. There is a bug, when you add for the second time, it keeps the previous id

  • @faizanhamza9339
    @faizanhamza9339 4 года назад +1

    Asp.net cor (y)

  • @ronaldjohnson4470
    @ronaldjohnson4470 4 года назад +1

    Great tutorial, thanks again

  • @argeelearner3978
    @argeelearner3978 4 года назад +4

    Thank you!! Please keep the ASP.NET Core tutorials coming!!! Amazing!!!

    • @CodAffection
      @CodAffection  4 года назад

      Sure, Keep learning and sharing.

  • @oguzierembethel1629
    @oguzierembethel1629 3 года назад

    Nice tutorial, why is the source code different from the vidoe?

  • @isiahjones_33
    @isiahjones_33 3 года назад

    There is a bug currently. When you Update an entry and then go to create a new entry the previous information is still loaded and you cannot save a new entry into the database. FYI. Easy fix.

    • @riwisan5391
      @riwisan5391 3 года назад

      Aha, please share the fix. TYVM!

  • @lescinqlune
    @lescinqlune 3 года назад

    Hi, Thank You for these valuable tutorials. I have one issue in this tutorial, once I edit a form, clicking on New Transaction will pop up the data that I already have updated, Please how to fix

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

    Thank you for this great tutorial! I really appreciate your approach to deal with jQuery Ajax CRUD using Popup Dialog in Asp.Net Core. I just have a question. How can I enable client side validation with this approach ?

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

      Glad it was helpful!
      I've discussed client side validation with same topic in one of my old video.
      here is the link : ruclips.net/video/DI_YppvLgJ8/видео.html
      you might need to make few adjustments inorder to adapt with latest versions.
      let me know how it goes. hopefully in future if I update the tutorial I will include client side validation.

  • @AriVenuth
    @AriVenuth 3 года назад

    Thanks for this great tutorial!
    tried to use in the mobile browser unfortunately do not open popups ...

  • @engr.malikmuhammadmubashir6828
    @engr.malikmuhammadmubashir6828 4 года назад

    Sir your website is down. What is the problem?
    "This Website's IP Has Been Changed"

  • @abdullahfaruquearman1908
    @abdullahfaruquearman1908 4 года назад

    Please upload a video tutorial about server side processing of data table with ajax in asp.net core....keep uploading more videos on asp.net core.

  • @CodeLuffix
    @CodeLuffix 4 года назад

    Anyone know why he unchecks configure for https in the creation at the beginning?

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

    This tutorial is just BOOOM! Thank you so much!

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

      көп уақытты айтады гой

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

    Thank you so much for another great video. It's very helpful. I have a request. Do you have video for authenticating to Active Directory while managing user list and roles in application database? So, when user comes to the web app using windows computer browser, it uses the logged in authentication and passes the authenticated username to application. It looks up the authenticated username in application user table and corresponding role. Thanks,

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

      Thanks,
      No video for Azure Active Directory yet. suggestion noted.

  • @edgarlepelblaires
    @edgarlepelblaires 4 года назад

    Hi!!! tk's for the amazing tutorial... can you share source code to download?
    Best regards!
    :)

  • @isuruabey
    @isuruabey 4 года назад

    Is this work with MVC Application

  • @ahmedmohamed-ti9mc
    @ahmedmohamed-ti9mc 2 года назад

    Thanks alot ,this is awesome tutorial

  • @anbuanbu6591
    @anbuanbu6591 4 года назад

    Hi your tutorials are very use full. I need your help. please let me know the mvc and web API based project solution architecture for hrms

  • @ajayghosh499
    @ajayghosh499 4 года назад

    Thanks, i came here for spinner code, when enter without values at "New Transaction". validation messages show with spinner simultaneously. help me with that.

  • @УльянаНикитина-к8п
    @УльянаНикитина-к8п 4 года назад

    Help, please, how to color the line in red if the value in the column is "No"?

  • @RandomVideos-bq2xn
    @RandomVideos-bq2xn 4 года назад

    And no source code ...

  • @theferdinantsetiawan
    @theferdinantsetiawan 4 года назад

    @CodeAffection : link project file please ..

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

    Thank you very much sir. Tell me, how do i make sure that my datatable does not go away after adding a new record with the popup?

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

      thanks for the comment.
      didn't understand your question.
      could you give the time in the video you are referring to.

  • @aldrinalmia3665
    @aldrinalmia3665 3 года назад

    Thank you for this video. It helps me.

  • @tsungik
    @tsungik 4 года назад

    Thanks for the video. Can you make a video on MVC. Net core using model view?