ok what i am trying to do is to add something in the textbox and after pressing the add button it should go into the select list. how would i do that with jquery?
I am not really able to make it work by your method .Please help? What i am doing wrong
<%= Html.ListBox("FeatureLists", ViewData["FeatureListListBox"] as MultiSelectList)%
$("#add").click(function() {
var val = $("#txtaddfeature").val();
alert("aaa");
$("", { 'value': val, text: val }).appendTo("#FeatureLists");
//$("#textbox").val(''); here if you want to clear the value for next time
});