i have two image controls on page image A and Image B, If image A is avaible in table hide image B on page and display image A, or if image B is available in table hide image A and display image B
<asp:FormView ID="Post" runat="server" CssClass=" " OnItemDataBound="Post_ItemDataBound">
<ItemTemplate>
<asp:Label ID="lblimagename" runat="server" Text='<%# Eval("fName") %>' Visible="false" />
<asp:Panel ID="pnlhidusers3" runat="server">
<a class="pull-left" href='<%#getUserHREF05(Container.DataItem)%>' style="margin-bottom: 2px;">
<asp:Image ID="imguserImage" runat="server" ImageUrl='<%#getSRCfusersh(Container.DataItem)%>'
CssClass="media-object img-rounded animated fadeInDown" Width="45px" Height="45px"
data-toggle="tooltip" title="Profile Photo" alt="" />
</a>
</asp:Panel>
<asp:Panel ID="pnlresimagesmall" runat="server">
<asp:Image ID="friIMAGE" runat="server" src='<%#getSRCIMAGESH(Container.DataItem)%> '
class="" Style="width: 45px; height: 45px" alt="" data-aria-label-part="" ImageUrl='<%# ("../PROFILEPHOTOS/") %>' />
</asp:Panel>
</ItemTemplate>
</asp:FormView>
protected void Post_ItemDataBound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
if (!string.IsNullOrEmpty((e.Item.FindControl("imguserImage") as Image).ImageUrl))
{
(e.Item.FindControl("pnlhidusers3") as Panel).Visible = true;
}
else
{
(e.Item.FindControl("pnlhidusershare3") as Panel).Visible = false;
}
}
}