开发者

JQuery Drag and Drop features with ASP.NET

开发者 https://www.devze.com 2023-01-23 21:28 出处:网络
Hey I wanna save the order of my list to the sql server database in jquery drag & drop using asp.net c#.

Hey I wanna save the order of my list to the sql server database in jquery drag & drop using asp.net c#.

How can I do t开发者_开发百科his?


jQuery UI has an event every time the user makes a drop, in that event you make a ajax request with the order of the elements to your server. There you save the order of the elements to your sql server.

$( ".selector" ).droppable({
   drop: function(event, ui) { 
       $.ajax({...})
   }
});

I dont know Asp.net C#, but saving something in the server side to the database should be the easy part.

0

精彩评论

暂无评论...
验证码 换一张
取 消