Link to home
Start Free TrialLog in
Avatar of Member_2_5230414
Member_2_5230414

asked on

restrict number upto 7

 Dim tildays As Decimal = dateallreadybooked.counttilleft(Session("Username"))

        While tildays > 0
            DropDownList1.Items.Add(New ListItem(tildays, tildays))

            tildays -= 0.5
        End While

Open in new window


How would i edit the code so the drop down menu will only reach 7

so if tildays = 58 then it will only go upto 7

if till days = 5 it will still show only 5
Avatar of kaufmed
kaufmed
Flag of United States of America image

While tildays > 0 AndAlso tildays <= 7

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_5230414
Member_2_5230414

ASKER

Thats great,,,, i would have never of thought of that logic!
NP. Glad to help  = )