Solved

drop down list in code behind

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

803 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