How to pass values to controller from Javascript code in MVC

后端 未结 3 492
一向
一向 2021-01-07 01:32

Actually I have a scenario like :

I am getting the values of checked records in GridView through Javascript. Now i need to send those values to controller for deleti

3条回答
  •  误落风尘
    2021-01-07 02:03

    You can use AJAX inside your script.

    Something like this

    $.ajax({
             url: 'Your method in controller which will delete the records',
             type: 'POST',
             data: ' data which you want to send to controler ',
    });
    

提交回复
热议问题