Click here to Skip to main content
13,552,709 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi programmers there, am developing a system in I want to insert bulk records in a table hence i want an control that will select all records(after binding it)so that i can use it in an insert into sql statement. Does dropdownlist control support selection of all record, i know it support multiple selection but i want all records to be selected.

Any idea of a control that can do this
Posted 13-Apr-13 3:21am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can have a control similar to: Multiselect Dropdown for Web Applications[^] - you can add one option of 'select all' at the top of items.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

i used a listbox with a do while loop


i As Integer = 0

While i < ListBox1.Items.Count



commandString =

"INSERT INTO xt (b) VALUES('"+listBox.items().Tostring() +"' );"

con.ConnectionString =

"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\simple.mdf;Integrated Security=True;User Instance=True"


cmd.Connection = con

cmd.CommandText = commandString


"Records Added Successfully")



"Records NOT Added")


System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1)
end while

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.180515.1 | Last Updated 9 May 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100