M
MSN
xp pro/vs 2002/web forms/VB
How do I make a checkbox checked when add it to a checkboxlist.
Thanks
How do I make a checkbox checked when add it to a checkboxlist.
Thanks
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
* "MSN said:How do I make a checkbox checked when add it to a checkboxlist.

* "Cor Ligthert said:Look at the post from Herfried, therefore I made some extra work to correct
it.
I still don't understand why Jay's solution should be wrong...
* "Cor Ligthert said:Did I say that Herfried?
Not with that quoting, looks if I reals sayd that now.Sounded like that, but EOT ;-).
Jay B. Harlow said:MSN,
The following works in VS.NET 2003.
Dim item As ListItem
item = New ListItem
item.Selected = True
item.Text = "Product1"
item.Value = "1"
CheckBoxList1.Items.Add(item)
item = New ListItem
item.Selected = False
item.Text = "Product2"
item.Value = "2"
CheckBoxList1.Items.Add(item)
item = New ListItem
item.Selected = True
item.Text = "Product3"
item.Value = "3"
CheckBoxList1.Items.Add(item)
The first & third item will be checked, the second will not.
Hope this helps
Jay
want
What post from Herfried? The only post from Herfried (as well as you) in
this thread is about using the Windows Forms CheckBoxList?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.