umair mohsin

umair mohsin

  • 1.3k
  • 353
  • 56.4k

refresh a section of page after record updated

Mar 13 2024 8:07 PM

         $("#upd").click(() => {
                let formdata = $("#formacad").serialize();

                $.ajax({
                    type: "POST",
                    url: "/Js/AddUpdateMethod",
                    data: formdata,
                    
                    success: function (result) {

                        location.reload();

                        
                    }
                }


                )

            })

 

as code shows this ajax request sending data to server updating record and reloading the page. this code works perfect(updating works) but i dont want to reload the page just want to update that section where these records foound.in case of any CRUD operation fetch  record from db and show here without reload.how can do this.

for this section i have set some css seting i don't want to disturb them


Answers (3)