vb.net Saving Checkboxlist checked items to database

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Dec 2008
Posts: 42
Reputation: fawadkhalil is an unknown quantity at this point 
Solved Threads: 0
fawadkhalil fawadkhalil is offline Offline
Light Poster

vb.net Saving Checkboxlist checked items to database

 
0
  #1
Jul 7th, 2009
Hi all
i have checkboxlist populated from a table in database.now how can i store only checked items to database.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 426
Reputation: Ramesh S will become famous soon enough Ramesh S will become famous soon enough 
Solved Threads: 81
Ramesh S Ramesh S is online now Online
Posting Pro in Training

Re: vb.net Saving Checkboxlist checked items to database

 
0
  #2
Jul 7th, 2009
Below is the C# code to get the selected items from a CheckBoxList

for (int i=0; i<checkboxlist1.Items.Count; i++)
         {

            if (checkboxlist1.Items[i].Selected)
            {

              //Write your code to store checked items into database
            }

         }
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 42
Reputation: fawadkhalil is an unknown quantity at this point 
Solved Threads: 0
fawadkhalil fawadkhalil is offline Offline
Light Poster

Re: vb.net Saving Checkboxlist checked items to database

 
0
  #3
Jul 7th, 2009
Thank u Ramesh for giving me idea how to start..
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC