Reputation: 509
i want to bind image in image control but according to the value in Eval
if Eval == True then imageurl = "image1" else imageurl = "image"
how to write if condition with eval to get above output
Upvotes: 2
Views: 1539
Reputation: 1193
Try
<%#(Eval("Columnname").ToString()=="True")?"Image1.jpg":"Image2.jpg"%>
Upvotes: 1