Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
C#: Month field not displaying
Nur Fasiha
Jan 11 2010 8:43 PM
2.4k
Reply
Hi. I need some C# expert help.
I have the DOB dropdown and I already got the Day and Year field out to display but not the month. Is there any ways that you could help?
Here are my codes:
int col = 0;
arrDOB = new ArrayList();
DateTime dob = Convert.ToDateTime(varDOB);
if (varDOB != "")
{
if (col == 0)
{
//Populates the day
ddlDay.Items.FindByValue(Convert.ToString(dob.Day)).Selected = true;
arrDOB.Add(dob.Day);
}
else if (col == 1)
{
//Populates the month
ddlMonth.SelectedValue = dob.Month.ToString();
// ddlMonth.Items.FindByValue(Convert.ToString(dob.Month)).Selected = true;
arrDOB.Add(dob.Month);
// ddlMonth.Visible = true;
}
//Populates the year
ddlYear.Items.FindByValue(Convert.ToString(dob.Year)).Selected = true;
arrDOB.Add(dob.Year);
}
Thanks. :))
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Can html table be directly added to a pdf
C#.net/profile URL/