I'm trying to display the day/month/year fields using DropDownLists, it works fine on the first page.

However, when I try to submit, it always fails. I don't know why.

The interesting thing is that it works when I remove the populating of the year DropDownList.

Here's how my code looks like:

-------------

Sub populateDD()
Dim inDay As Integer
Dim strDay As String
Dim arrDay As ArrayList = new ArrayList()
For inDay = 1 To 31
If inDay < 10 Then
strDay = "0" & CStr(inDay)
Else
strDay = "" & CStr(inDay)
End If
arrDay.Add(strDay)
Next
ddlDD1.DataSource = arrDay
ddlDD1.DataBind()
End Sub

Sub populateMM()
Dim inMonth As Integer
Dim arrMonth As ArrayList = new ArrayList()
For inMonth = 1 To 12
arrMonth.Add(MonthName(inMonth))
Next
ddlMM1.DataSource = arrMonth
ddlMM1.DataBind()
End Sub

Sub populateYYYY()
Dim inYear, inYearBegin, inYearEnd As Integer
Dim arrYear As ArrayList = new ArrayList()
inYearBegin = 1901
inYearEnd = Year(Now)
For inYear = inYearBegin To inYearEnd
arrYear.Add(CStr(inYear))
Next
ddlYYYY1.DataSource = arrYear
ddlYYYY1.DataBind()
End Sub

-------------

I call these 3 functions upon Page_Load event. "ddlDD1", "ddlMM1", "ddlYYYY1" are the web controls I use for day/month/year respectively.

Anyone can advise me why? I'm stuck on this for a few days already and it's very frustrating.

Many thanx!