how to use 'and' operator in Eval method

Posted by Suneel161 under Regular Expressions on 4/13/2010 | Views : 3538 | Status : [Member] | Replies : 1
hii

i'm comparing to fields in eval method.but it doesnt work.
this is the code. how to solve

<asp:Image ID="Image7" runat="server" ImageUrl="~/Image/cros.bmp" Visible='<%#Convert.ToInt32(Eval("date"))==7 && Eval("status").ToString()=="on contract"%>' />




Responses

Posted by: Sbanerjee on: 4/13/2010 [Member] Starter

Up
0
Down
You can try
visible='<%# (Convert.ToInt32(Eval("date"))==7 && Eval("status").ToString()=="on contract")?true:false%>'

Let me know this worked or not :)


Regards,
SOumen

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response