Link to home
Start Free TrialLog in
Avatar of kw66722
kw66722

asked on

Dropdown list creating values from current year

I am using dot net and I want to create a dropdown list that contains the current year and the next ten years. I am not sure how to populate the table.  

Something like below which does not work.

    <asp:DropDownList ID="DropDownList1" runat="server">
                <asp:ListItem Value="=year(getdate())"></asp:ListItem>
                 <asp:ListItem Value="=year(getdate() + 1)"></asp:ListItem>
            </asp:DropDownList>
     

ASKER CERTIFIED SOLUTION
Avatar of Tuyau2poil
Tuyau2poil

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 kw66722
kw66722

ASKER

that worked.  I created a control and up the code in the init event.