开发者

how to bind image in image control in asp.net

开发者 https://www.devze.com 2023-01-01 09:08 出处:网络
i want to bind image in image control but according to the value in Eval if Eval == True then imageurl = \"image1\"

i want to bind image in image control but according to the value in Eval

if Eval == True then imageurl = "image1" else imageurl = "i开发者_Python百科mage"

how to write if condition with eval to get above output


Try

<%#(Eval("Columnname").ToString()=="True")?"Image1.jpg":"Image2.jpg"%>
0

精彩评论

暂无评论...
验证码 换一张
取 消