Using jQuery to reorder a list
<p>I'm attempting to use the List Reorder from here:  <a href="http://www.utdallas.edu/~jrb048000/ListReorder/" rel="nofollow">http://www.utdallas.edu/~jrb048000/ListReorder/</a></p>

<p>I've got all the scripts in place, and my events are firing properly on dragging/dropping, but I'm unable to see anything in my object.</p>

<p>The goal is to reorder the list, and save the new order back to the DB. I am assuming something is wrong with my syntax in the lists.bind, as it shows the actual items in the list, but the values are empty.</p>

<pre><code>            $(document).ready(function () {
            var options = {
                itemHoverClass: 'itemHover',
                dragTargetClass: 'dragTarget',
                dropTargetClass: 'dropTarget',
                useDefaultDragHandle: true
            };

            var lists = $('.lists').ListReorder(options);
            var items = [];
            lists.bind('listorderchanged', function (evt, jqList, listOrder) {
                for (var i = 0; i &lt; listOrder.length; i++) {
                    items[i] = $("ul li:eq(" + i + ")").attr('id');
                }
            });

            $('#btnSave').click(function () {
                if (items.length &gt; 0) {
                    var jsonText = JSON.stringify({ items: items });
                    $.ajax({
                        type: "POST",
                        url: 'ManageSliders.aspx/SaveReOrder',
                        data: jsonText,
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function () { $("#result").html("New order saved successfully"); },
                        failure: function (msg) { alert(msg); }
                    });
                }
                else {
                    alert("You have made no changes");
                }
            });
        });
</code></pre>

<p>I'm binding a listview using C# and that is showing up fine as well.</p>

<pre><code>&lt;ul class="lists"&gt;
        &lt;asp:ListView ID="lvSliders" runat="server"&gt;
            &lt;LayoutTemplate&gt;
                &lt;asp:Panel ID="itemPlaceHolder" runat="server" /&gt;
            &lt;/LayoutTemplate&gt;
            &lt;ItemTemplate&gt;
                &lt;li id='&lt;%# DataBinder.Eval(Container.DataItem, "Id")%&gt;'&gt;
                    &lt;%# DataBinder.Eval(Container.DataItem, "Title")%&gt;&lt;/li&gt;
            &lt;/ItemTemplate&gt;
            &lt;ItemSeparatorTemplate&gt;
            &lt;/ItemSeparatorTemplate&gt;
        &lt;/asp:ListView&gt;
    &lt;/ul&gt;
</code></pre>

<p>I ran it through Fiddler, and it is throwing me this error:</p>

<p>{"Message":"Cannot convert object of type \u0027System.String\u0027 to type \u0027System.Collections.Generic.List<code>1[System.String]\u0027","StackTrace":"   at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object&amp; convertedObject)\r\n   at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object&amp; convertedObject)\r\n   at System.Web.Script.Services.WebServiceMethodData.StrongTypeParameters(IDictionary</code>2 rawParams)\r\n   at System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target, IDictionary<code>2 parameters)\r\n   at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData, IDictionary</code>2 rawParams)\r\n   at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}</p>
