PDA

View Full Version : DOB Drop-down


Zanzubaa
05-22-2006, 02:13 PM
Im making a form that takes someonse date of birth. It will use 3 drop-down menus. Day, month and year. My question is, is it possable to enter a range into the menus such as (1-31) or (Jan-dec) at the moment I have to use:

<asp:DropDownList ID="dobd" runat="server">
<asp:ListItem value="" text="DAY" />
<asp:ListItem value="" text="01" />
<asp:ListItem value="" text="02" />
<asp:ListItem value="" text="03" />
<asp:ListItem value="" text="04" />
<asp:ListItem value="" text="05" />
<asp:ListItem value="" text="06" />
<asp:ListItem value="" text="01" />
<asp:ListItem value="" text="07" />
<asp:ListItem value="" text="08" />
etc
etc
<asp:ListItem value="" text="09" />

Seems a little silly, same for month and year

degsy
05-22-2006, 04:13 PM
Using Classic ASP VBScript you would use a loop for the Day, Month and Year then use CDate to validate it.