2
<asp:Repeater ID="rptEntries" runat="server" DataSourceID="dsEntries">
<ItemTemplate>
<%
if (Convert.ToInt16(Eval("entryWinner")) == 1)
{
%>
<%# "<div class=\"imgThumb draggable\" style=\"background-image:url('uploads/"
+ Eval("entryImagename") + "');\" data-id=\"" + Eval("pk_entryId")
+ "\"></div>"
%>
<%
}else{
%>
<%# "<div class=\"imgThumb draggable\" style=\"background-image:url('uploads/"
+ Eval("entryImagename") + "'); filter: grayscale(100%);\" data-id=\""
+ Eval("pk_entryId") + "\"></div>"
%>
<%
}
%>
</ItemTemplate>
</asp:Repeater>
중계기에 :검사 값 저점 IF I는 표시하기 전에 entryWinner에서 테 값을 확인하려면,하지만 TEH 다음과 같은 오류 제공
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.