Databinder.Eval() problem in Datalist
-
Hi... I am using datalist. In dat i am binding abea ll like this... ]]>)'> Now in codebehind, I am using OnItemDataBound event and want to check if its value is null.. I am taking this labels value in a string & comparing it to "" But the value dat comes in string is £(<%# DataBinder.Eval(Container.DataItem,"Cost","{0:n2}") %>). Nd i want the actual value to be checked. Plz tell me how to solve this...
-
Hi... I am using datalist. In dat i am binding abea ll like this... ]]>)'> Now in codebehind, I am using OnItemDataBound event and want to check if its value is null.. I am taking this labels value in a string & comparing it to "" But the value dat comes in string is £(<%# DataBinder.Eval(Container.DataItem,"Cost","{0:n2}") %>). Nd i want the actual value to be checked. Plz tell me how to solve this...
write like this ]]>' /> This way your expression will be evaluated otherwise Eval will be treated as a string not as an expression
Nobody is perfect i'm Nobody