Click here to Skip to main content
15,921,837 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I created a web form with many button representing time slots. I want users to click on the slots and book it, and store the results in a database. When I first open the web form, I need a way to loop through the buttons and populate their labels with the entries in the database (to show those button slots that have already been booked).

How can I get VB to loop through the buttons, which are named as slot1, slot2, slot3, etc?

Thanks for any pointers.
Posted

1 solution

Why can't you add the button's from the code behind page_load or page_init event. Then you can assign whatever properties and assign whatever handlers before rendering it to the client.

What is the difficulty in it?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900