Hi, I am using jquery selectable to select items within a .net listview. user can select his desired item and can save it by clicking a save button. Next time when the user will come to page, he will be able to see his previously selected item.
Using Jquey selectable plugin user can select an item by clicking it. Now My question is: 1. How can I display the existing selected item at 1st load 2. After selecting items how can I get selected item's value from code behind page so that I can save it to database.
Any suggestion?
Thanks in advance.
my html code is:
<ul id="ulSelectable" class="ui-selectable">
<li id="196500" class="ui-selectee ui-selected">
<div id="dvItem">
<img id="Interest_lvResult_ctrl0_ctl00_imgInterest" src="Images/Pic1.jpg"/>
</div>
<div class="Profile_Interests_Card_ItemName"> Driver </div>
</li>
<li id="196600" class="ui-selectee">
<div id="dvItem">
<img id="Interest_lvResult_ctrl0_ctl01_imgInterest" src="Images/Pic2.jpg" />
</div>
<div class="Profile_Interests_Card_ItemName"> Builder </div>
</li>
</ul>
And my javascript:
<script type="text/javascript">
var setSelector = "#ulSelectable";
$(function() {
$(setSelector).selectable({ filter: 'li' });
});
</script>