Author: quantum_kev | Posted on: 11/21/2008 1:39:29 PM | Views : 319

Ok- this is probably going to be something very silly, but alas, I will ask because I don't know an easy answer :

I am trying to populate 2 dropdown controls that will allow a user to specify any time in a 24 hour period, in military time. The first dropdown, I have hard coded the list items to respresent the available hour choices, from 00 to 23.

However, I am hesitant to hard code 60 different list items for the available minute place in the desired time, i.e. the '27' in 14:27. I have thought about databinding to a database table, but it seems pointless to create a table that would only have those values.

Does anyone have any tips or ideas for how to populate the 'minutes' dropdown without hardcoding it? I thought about doing it at runtime dynamically, but am not sure if that is the way to go. I am rather new to ASP.NET, so I am still learning the tips and tricks.

 

Thank you.

 

q-kev
...

Go to the complete details ...