Author: Pmillio | Posted on: 9/7/2009 1:21:11 PM | Views : 304

Hi i have the following code which populates 3 dropdown lists, now when i click on a button to save it back to the database, i get an error sayings its an inavlid date, when the date is definitely correct. The date i was saving was 27/4/1954
This is what my code looks like, can anyone spot what i am doing wrong;
DateTime dt = users._DateOfBirth; int intDay = dt.Day; int intMth = dt.Month; int intYear = dt.Year; // populate the days drop down for (int day = 1; day < 32; day++) { ListItem li = new ListItem(); li.Text = day.ToString(); li.Value = day.ToString(); ddlDay.Items.Add(li); ddlDay.SelectedValue = intDay.ToString(); } // populate the Months drop down ...

Go to the complete details ...