Solved

drop down list in code behind

Posted on 2011-09-20
2
239 Views
Last Modified: 2012-05-12
Hello,

I would like to populate my dropdown list in the code behind with numbers.

but i need it to count down in 0.5

so if a user has 7 days holiday i want to have the drop down menu go

7/6.5/6/5.5/5/4.5/4/3.5/3/2.5/2/1.5/1/0.5

and if the have 3 it would be 3/2.5/2/1.5/1/0.5
0
Comment
Question by:runnerjp2005
2 Comments
 
LVL 15

Accepted Solution

by:
crisco96 earned 500 total points
ID: 36566453
dim holidaydays as decimal = 7'7 or 3, not sure how you're setting this

'This assumes your dropDown is named daysDDL, change to whatever your actual ID is
While holidaydays > 0
	daysDDL.items.add(holidaydays)
	holidaydays -= 0.5
End While

Open in new window

0
 

Author Closing Comment

by:runnerjp2005
ID: 36566480
Perfect!!!
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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

863 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

20 Experts available now in Live!

Get 1:1 Help Now