Try this for an example
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="DropDownDate.aspx.vb" Inherits="DropDownDate" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" runat="server" Width="272px">
</asp:DropDownList></div>
</form>
</body>
</html>
Code Behind
Partial Class DropDownDate
Inherits System.Web.UI.Page
Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
If Not Me.IsPostBack Then
Dim Dates As New Collections.Generic.List(Of System.DateTime)
' Add next 5 years
For i As Integer = 1 To 5
Dates.Add(System.DateTime.Now.AddYears(i))
Next
Me.DropDownList1.DataSource = Dates
Me.DropDownList1.DataTextField = "Year"
Me.DropDownList1.DataBind()
End If
End Sub
End Class
Regards,
Martin.