M
Mike
I'm using a SqlDataSource to fetch data and display it in a FormView. One
of the elements is an image:
<asp:Image ID="ImageFile" runat="server" ImageURL='<%# Eval("ImageFile",
"~/storyimages/{0}") %>' />
However, sometimes there is no image to display, and therefore I want to set
the Image control's Visible property to false. I tried evaluating whether
the ImageFile field has a vlaue or not and using it to set the Visible
property like so:
Visible='<%# Eval("ImageFile") != DBNull.Value %>'
Nor does Visible='<%# Eval("ImageFile").ToString()!=null%>'
Can anyone point me ion the right direction?
Thanks
of the elements is an image:
<asp:Image ID="ImageFile" runat="server" ImageURL='<%# Eval("ImageFile",
"~/storyimages/{0}") %>' />
However, sometimes there is no image to display, and therefore I want to set
the Image control's Visible property to false. I tried evaluating whether
the ImageFile field has a vlaue or not and using it to set the Visible
property like so:
Visible='<%# Eval("ImageFile") != DBNull.Value %>'
Nor does Visible='<%# Eval("ImageFile").ToString()!=null%>'
Can anyone point me ion the right direction?
Thanks