Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 For each...

Author  Topic 

JJ297
Aged Yak Warrior

940 Posts

Posted - 2007-11-08 : 14:17:25
How do I read through the database to get the items that are checked to appear on my page?

I wrote this but it brings back all items checked...

For Each l As ListItem In CheckBoxList1.Items

l.Selected = True

Next

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-11-08 : 14:26:28
So is your question about the application code or the database code? What you have posted here is application code. For application code, you should post your questions in a forum that deals specifically with the programming language that you are using. We have a .NET forum here. Let me know if you want me to move the thread to that forum as I am a moderator here.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

JJ297
Aged Yak Warrior

940 Posts

Posted - 2007-11-08 : 14:32:41
Thanks please move it.
Go to Top of Page

ann
Posting Yak Master

220 Posts

Posted - 2007-11-09 : 09:14:27
Can you give a little more detail on what you are doing?
Go to Top of Page

JBelthoff
Posting Yak Master

173 Posts

Posted - 2007-11-09 : 20:36:52
quote:
Originally posted by JJ297

I wrote this but it brings back all items checked...

For Each l As ListItem In CheckBoxList1.Items

l.Selected = True

Next



Of course it does. You are saying for each checkbox the selected is true. So every checkbox will be checked.

JBelthoff
• Hosts Station is a Professional Asp Hosting Provider
› As far as myself... I do this for fun!
Go to Top of Page
   

- Advertisement -