Solved

drop down list in code behind

Posted on 2011-09-20
2
238 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

19 Experts available now in Live!

Get 1:1 Help Now