Feb 23, 2013 05:57 PM|SHR|LINK
I have a sqldatasource with WHERE clause as VisitDate=@VisitDate. the date comes from a label - lblVistDate, which gets its value from a multicolumn combobox.
the SelectParameters are as follows
<asp:ControlParameter ControlID="lblVisitDate" PropertyName="Text" Type="DateTime" DefaultValue="Null" Name="VisitDate"></asp:ControlParameter>
I get error
"The string was not recognized as a valid DateTime. "
I have tried various things as CType, CDate, Convert.DateTime - but the error persist.
Any help please is very much appreciated. I am sure this is one of those basic mistake I am making somewhere.