I have the following ListView in which I am using the JQuery UI sortable function to be able to sort the items in the ListView. The problem is that I can't put a sortable class on the table in the ItemTemplate because it does not work, if I put a class="sortable" on the outer div, it works, but it allows me to sort everything within the ListView, I just want to be able to move sort the tables. Here is the markup
<div> //Works here, but hr's become sortable too.
<asp:ListView ID="lvwDocuments" runat="server">
<LayoutTemplate>
<h3>
Documents</h3>
<asp:PlaceHolder ID="itemPlaceHolder" runat="server">
</asp:PlaceHolder>
</LayoutTemplate>
<ItemTemplate>
<table class="sortable"> //Does not work Here
<tr>
<td>
<p class="title">
<a runat="server" href='<%#Eval("url") %>'>
<%#Eval("title") %></a></p>
<br />
<p>
<%#Eval("description") %></p>
</td>
</tr>
</table>
</ItemTemplate>
<ItemSeparatorTemplate>
<hr />
</ItemSeparatorTemplate>
</div>
Also, How can I preserve the sort order even after the page is refreshed.