2

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

1
  • what you want to do?you want to bind the image with control after checking the condition?on which langauge you are working c#.vb etc? Commented May 31, 2010 at 7:11

1 Answer 1

1

Try

<%#(Eval("Columnname").ToString()=="True")?"Image1.jpg":"Image2.jpg"%>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.