J
Jeff User
Hi all
The date values in my dropdown list appear as mm/dd/yyyy
Specifically, the day always contains 2 digits.
I need to set the selected index of the dropdown to the date that
equals another date value that does not use 2 digits for the day, if
the day is less that 10.
example
ddlBeginDate.SelectedIndex =
ddlBeginDate.Items.IndexOf(ddlBeginDate.Items.FindByText(someClass.BeginDate.ToShortDateString()));
does not work when the list contains 10/07/2006
and the value returned by someClass.BeginDate.ToShortDateString() is
10/7/2006
How can I set this list value to be the date returned frm the class?
Thanks
Jeff
The date values in my dropdown list appear as mm/dd/yyyy
Specifically, the day always contains 2 digits.
I need to set the selected index of the dropdown to the date that
equals another date value that does not use 2 digits for the day, if
the day is less that 10.
example
ddlBeginDate.SelectedIndex =
ddlBeginDate.Items.IndexOf(ddlBeginDate.Items.FindByText(someClass.BeginDate.ToShortDateString()));
does not work when the list contains 10/07/2006
and the value returned by someClass.BeginDate.ToShortDateString() is
10/7/2006
How can I set this list value to be the date returned frm the class?
Thanks
Jeff