Link to home
Start Free TrialLog in
Avatar of Seven price
Seven priceFlag for United States of America

asked on

aspnet front end if else statement

This if else statement does not work.
Not sure what is the small modification this needs.

 <%If IIf(Eval("PallCost") Is DBNull.Value, "False", "True") Then%>
                     <%#DataBinder.Eval(Container.DataItem, "CaseCost", "{0:c}")%>
                     <% Else%>
                       <%#DataBinder.Eval(Container.DataItem, "PallCost", "{0:c}")%>
                      <% End If%>
ASKER CERTIFIED SOLUTION
Avatar of Shaun Kline
Shaun Kline
Flag of United States of America 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
Avatar of Seven price

ASKER

Error    477    Operator '=' is not defined for types 'Object' and 'System.DBNull'.  


Oh yeah this is inside a Datalist control
SOLUTION
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
Error    429    Operator '=' is not defined for types 'Object' and 'System.DBNull'.    

SOLUTION
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
weird every row comes back with Currency and thats it.
thanks guys