Solved

vb.net - on page load controls populate based on MS SQL 2005 query

Posted on 2010-09-04
3
317 Views
Last Modified: 2013-11-27
Looking for code that poulate checkboxes or radioboxes based on a query from ms sql 2005 query.

Select first_name from address where id = "us"

if the number returns 12 then populate the form with 12 checkboxes or radioboxes...

then a submit button at bottom of form so user can choose howmany firstnames they want to choose for the invite...
0
Comment
Question by:GlobaLevel
  • 2
3 Comments
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 33604756
You can add a column in you SQL table with bit datatype.the bit when it is populated in a form (datagridview or details view) it gives a check box.then when you update your selections you automatically gain what you want
0
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 33604762
Also you can have multiple selections only with checkboxes.
0
 
LVL 1

Accepted Solution

by:
supersugar earned 500 total points
ID: 33623719
to generate checkbox dynamically:
For Each record in records
    dim checkbox as new checkbox
    checkbox.text=record("first_name")
   checkbox.potision=xx
   me.controls.add(checkbox)
...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now