G
Guest
I'm trying to populate a drop down with dates from a data field in my data
base but I want the format like MM/dd/yyyy instead of 1/1/2006 12:00 PM
How can I my date to show as 1/1/2006?
I'm populating the dropdown via a dataset and doing a:
string time =
Convert.ToDateTime(dataset.tables[0].rows[0]["fieldDate"].toString()).ToShortDateString();
dropdown.datatexfield = time;
dropdown.datavaluefield = time
dropdown.databind();
DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with
the name 12/31/2006
and it highlights this code:
dropdown.databind();
what am I missing?
but i'm getting this error:
base but I want the format like MM/dd/yyyy instead of 1/1/2006 12:00 PM
How can I my date to show as 1/1/2006?
I'm populating the dropdown via a dataset and doing a:
string time =
Convert.ToDateTime(dataset.tables[0].rows[0]["fieldDate"].toString()).ToShortDateString();
dropdown.datatexfield = time;
dropdown.datavaluefield = time
dropdown.databind();
DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with
the name 12/31/2006
and it highlights this code:
dropdown.databind();
what am I missing?
but i'm getting this error: