Connecting Tech Pros Worldwide Forums | Help | Site Map

get value from checklistbox after selection to store data in sql database in vb.net

Newbie
 
Join Date: Sep 2008
Posts: 3
#1: Sep 24 '08
Hor do I get value from chekexlistbox after selection of 4 checklistbox
to store data in sql database in vb.net

Stang02GT's Avatar
Moderator
 
Join Date: Jun 2007
Location: USA
Posts: 1,152
#2: Sep 24 '08

re: get value from checklistbox after selection to store data in sql database in vb.net


Moved to VB forum please make sure you are posting in the correct forum.
kadghar's Avatar
Expert
 
Join Date: Apr 2007
Location: Mexico City
Posts: 1,155
#3: Sep 24 '08

re: get value from checklistbox after selection to store data in sql database in vb.net


check the CHECKEDINDICES property, you can use it's indices, check this little example:

Expand|Select|Wrap|Line Numbers
  1. Dim str1 As String = "Checked indices are: "
  2. Dim i As Integer
  3. For i = 0 To CheckedListBox1.CheckedIndices.Count - 1
  4.     str1 = str1 & CheckedListBox1.CheckedIndices(i).ToString & ", "
  5. Next
  6. MsgBox(str1)
hope it helps.
Reply