How do i do this
If this the image column in database is empty hide this image from page
<asp:Image ID="Image3" runat="server" class="" Style="width: 100%" ImageUrl='<%# "UserImage/"+Eval("ImageName1")%>' />
Hi micah,
Please use below code.
<asp:Image Visible='<%# (Eval("ImageName1").ToString()== "null") || (Eval("ImageName1").ToString() == String.Empty) ? false :true %>' ID="Image4" runat="server" Width="100px" ImageUrl='<%# Eval("ImageName1") %>' GenerateEmptyAlternateText="True" EnableViewState="False" />
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.