ASP.NET & jQuery multi-select dropdownlist, get se

2019-08-29 10:22发布

问题:

I have an .aspx page with a databound multi-select jquery dropdown. This works nicley but how can i get hold of the selected items in the code behind?

回答1:

You can use jquery dropdown cheklist. Here is how you can get selected items http://dropdown-check-list.googlecode.com/svn/trunk/doc/dropdownchecklist.html see line 261.



回答2:

You can get Select Items by using below Code and store this selected item in an array for further need.

var phddoc = new Array();
            $.each($("#phddoct").next().find('input').filter(':checked'), function() {
                phddoc.push($(this).val());


            });

here 'phddoct' is the id of the select box[multiselect object]

best wishes.. shareef m2d