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>
     

ASP.NET

Avatar of undefined
Last Comment
kw66722

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Tuyau2poil

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
kw66722

ASKER
that worked.  I created a control and up the code in the init event.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy