B
Brad Farrell
I'm trying to code a line in my .asp that will check for one of three values
in a field and either:
a) if null, no display
b) if set to -.01, show the "Please call..."
c) show the price
I can't see how my code below is failing, but I get an error
error CS0131: The left-hand side of an assignment must be a variable,
property or indexer
Any ideas?
Using .net 2.0 and VSE 2005
Thanks.
<%# (Double.Parse(DataBinder.Eval(Container.DataItem,
"SalePrice").ToString()) = 0) ? "" :
(Double.Parse(DataBinder.Eval(Container.DataItem, "SalePrice").ToString())
= -.01) ? "<font color=\"#ff0000\">Please call for price" :
"Special price: </b><font color=\"#ff0000\">" +
DataBinder.Eval(Container.DataItem, "SalePrice", "{0:c}")%>
in a field and either:
a) if null, no display
b) if set to -.01, show the "Please call..."
c) show the price
I can't see how my code below is failing, but I get an error
error CS0131: The left-hand side of an assignment must be a variable,
property or indexer
Any ideas?
Using .net 2.0 and VSE 2005
Thanks.
<%# (Double.Parse(DataBinder.Eval(Container.DataItem,
"SalePrice").ToString()) = 0) ? "" :
(Double.Parse(DataBinder.Eval(Container.DataItem, "SalePrice").ToString())
= -.01) ? "<font color=\"#ff0000\">Please call for price" :
"Special price: </b><font color=\"#ff0000\">" +
DataBinder.Eval(Container.DataItem, "SalePrice", "{0:c}")%>