There are a few ways to handle it.
You would need to use the <asp:BulletedList> instead of a ListBox
When you run the page you'll notice the BulletList renders to html as a <ul> or <ol> depending on the BulletStyle selection whereas the ListBox renders to <select>
Also, make your life easier, on any asp control you wish to have jQuery/jQueryUI act, set it's ClientIDMode property to Static.
And, like ListBox, BulletedList is also a databound control so you would fill the list server side and transform its appearance using jQueryUI clientside
Example:
<asp:BulletedList ID="BulletedList1" runat="server" ClientIDMode="Static" BulletStyle="Numbered">
<asp:ListItem Text="X" Value="X"></asp:ListItem>
<asp:ListItem Text="Y" Value="Y"></asp:ListItem>
</asp:BulletedList>
Renders to:
<ol id="BulletedList1" style="list-style-type:decimal;">
<li>X</li>
<li>Y</li>
</ol>
Which you can now see how you would apply Jquery UI's Selectable
Unfortunately it's not as simple to pass back client side data via postback. I thought it would be a simple matter of looking for jqueryui's ui-selected property, but it's a little more involved.
Example of jQueryUI selection data posted back to server-side:
It requires the addition of a HiddenField to hold the selected item indexes as a csv.
<asp:HiddenField ID="HiddenField1" runat="server" />
And some additional jQuery code that makes use of jQueryUI's selectable stop event. This is used to iterate through a sub-list of selected items to build a CSV of indexes that can be parsed and looped through, server side, to retrieve data from the bulleted list:
$("#BulletedList1").selectable({
stop: function () {
//Save some Reference variables
var $SetOfSelected = $("li.ui-selected", this);
var $hf = $("#HiddenField1");
var count = $SetOfSelected.length;
// iterate through the list of selected items and build the csv
$SetOfSelected.each(function (idx) {
var i = $("#BulletedList1 li").index(this)
$hf.val((idx == 0) ? i : $hf.val() + ',' + i);
});
if (count == 0)
$hf.val("");
}
});