jeudi 22 novembre 2018

Multiple if else statement in repeater for visible

<asp:ImageButton ID="btnlike" runat="server" src="images/sheart1.png" 
Visible='<%# Convert.ToInt32(Eval("likeunlike")) == 1 ? true :  false%>'/>

Select likeunlike from tbllike.

I am using select statement to select and bind but sometimes it will return no rows. Visible='<%# Convert.ToInt32(Eval("likeunlike")) == 1 || Eval("likeunlike") == DBNull.Value ? true : false%>'. I wanna check if no row return will be visible but still cannot. Can someone help?

Aucun commentaire:

Enregistrer un commentaire