Using Jquery to add items in Listbox from Textbox
- by Pratik Gupta
I am stuck somewhere using jquery to append the list box from a text box.
here is my jquery
$("#btnAddSvc").click(function () {
var svc = $("#<%= txtServiceName.ClientID %>").val(); //Its Let you know the textbox's value
svc.appendTo("#<%=lstSvcName.ClientID %>");
});
I am using asp.net (c#) to develop my code
<asp:Button ID="btnAddSvc" runat="server" Text=">>" Font-Size="Medium" />
<asp:ListBox ID="lstSvcName" runat="server" SelectionMode="Multiple" ToolTip="Selected Service Names"
Width="169px"></asp:ListBox>
can someone please help as i am not able to get the values in list box.