Solved

drop down list in code behind

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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 was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

821 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