Hello, I'm currently working on a webpage in Visual Studio 2008. The page is about adding websites and info about those websites into a database.
Now here is the problem:
On the webpage you can select the subjects from a checkboxlist. Can someone help me on how to put the selected items into the database using C#?
I'm pretty much of a C# noob so I need all of the code.
Need help with checkboxlist to database
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Manikavelu VelayuthamRank #413 · 6K reputationPosted Oct 1, 2010, 3:42 AM EDT
for(int i=0;i
SelectedValues+=CheckedListbox1.CheckedItems[i].ToString() + "\n";
}
Joris van Twist12 reputationPosted Oct 1, 2010, 4:18 AM EDT
So I can't use "CheckedItems".
Now I have something like this (still doesn't work):
string selectedValues;
for (int i = 0; i < checkboxlist.Items.Count; i++)
{
selectedValues += checkboxlist.Items[i].ToString() + "\n";
}