Hi
Set the paid value to a field.
<ItemTemplate>
<asp:TextBox ID="IsPaid" runat="server" Text='<%#Eval("IsPaid")%>' />
</ItemTemplate>
However this is a dirty way. You can get the datasource in code behind , convert to the corresponding object (may be dataset) and get the paid value using the candidate id would be fine. As I am not sure about your data source I am giving this alternate way.
Then in your
Item DataBound
event handler Check the
isPaid
and make the image hidden or not.
protected void CandidateFProfile_ItemDataBound(object sender, DataListItemEventArgs e)
{
TextBox isPaid = (TextBox)e.Item.FindControl("IsPaid");
string paid = isPaid.Text;
if (paid == "false" || paid == "0")
{
e.Item.FindControl("image3").Visible = false;
}
e.Item.FindControl("IsPaid").Visible=false;
}