带有jQuery UI可排序序列化方法的ASP.NET Web服务示例

带有jQuery UI可排序序列化方法的ASP.NET Web服务示例,asp.net,web-services,jquery-ui,jquery-ui-sortable,Asp.net,Web Services,Jquery Ui,Jquery Ui Sortable,我正在使用serialize和ASP.NET Web服务构建可排序的jQuery UI,以便在数据库中存储订单 我知道如何在php中实现它,但我不知道如何在ASP.NET中实现它。。。我试着用谷歌搜索,但没有成功 $('#mylist').sortable({ handle: ".handle", axis: "y", update: function () { var order = $(this).sortable

我正在使用serialize和ASP.NET Web服务构建可排序的jQuery UI,以便在数据库中存储订单

我知道如何在php中实现它,但我不知道如何在ASP.NET中实现它。。。我试着用谷歌搜索,但没有成功

   $('#mylist').sortable({
        handle: ".handle",
        axis: "y",
        update: function () {
            var order = $(this).sortable('serialize');
            alert(order);
        }
    });
给我查询字符串
item[]=2和item[]=1和item[]=3和item[]=4


我需要将其传递到Web服务中,并将新订单存储到数据库中。

有一系列文章可以让您朝着正确的方向开始

我认为是执行下面的代码

$('#mylist').sortable({
    handle: ".handle",
    axis: "y",
    update: function () {
        var order = $(this).sortable('toArray');
    }
});
它按id的出现顺序给出id的数组。现在,当您保存并取回此数组时,请执行此操作。 //伪码

for each id in the arrayList
GetElementByid(id); attach to parent UL
最后,如果您看到,列表将按照前面的状态排列