Link to home
Start Free TrialLog in
Avatar of shieldguy
shieldguyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Null Value problem when binding repeater value

I am getting the error while binding the date value in a repeater control

Error :
Public member 'ToShortDateString' on type 'DBNull' not found

I dont understand that instead of putting in the validation check this still giving me the same error
I would really appriciate a quick reply

Thanks
<FONT FACE="Arial" SIZE="2"><B><%#IIf(Container.DataItem("OrderDate") Is DBNull.Value, "&nbsp;", DataBinder.Eval(Container.DataItem, "OrderDate").ToShortDateString)%></B></FONT>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try to change:
IIf(Container.DataItem("OrderDate") Is DBNull.Value

to:
IIf(Container.DataItem("OrderDate") = DBNull.Value