There are several forms in the project that require multiple selection functions. I wrote them in JS and didn't use the traditional checkbox. The reason is that when there are many options, it is very likely to be missed, of course, this may also be my personal feeling, with a very eye-catching effect, so that the selected items can be clearly seen.
I remember I read the Asp.net custom control and encapsulated it myself, althoughCodeIt's ugly, but it's also convenient for our team's students and sisters to copy JavaScript every time.
The effect is as follows:
Easy to use:
1. Reference controls. dll
2. Add a selection item in the vs toolbar.
3. Copy the resource file and place it in the website project.
4. Configure <etettings> <add key = "multiselect: basepath" value = "plugin/multiselect"/> </appsettings> in Web. config
5. Drag multiselect In the toolbar to the page for development. The received data source is datatable, the first column is the ID, and the second column is the label text. Obtain the value through value. The value is a list <int> type list.
Package download: Download