K
Keith G Hicks
I'm hoping there's a simple way to do this. I need to show a dummy image in
an asp image object if the file is missing. Here's my asp.net 2.0 markup:
<asp:Image ID="imgGrad" runat="server" BorderColor="DimGray"
BorderStyle="Solid" BorderWidth="1px" Height="120px" ImageUrl='<%#
"~/Images/ClassmatePics/" & Eval("GradPhotoFileName") %>' ToolTip="Click to
enlarge" /></td>
"GradPhotoFileName" is stored in a field in a table. If the file name stored
in the table is "JeffJones.jpg" but there is no "JeffJones.jpg" file in the
"~/Images/ClassmatePics/" folder then I have a dummy jpg image that I want
to show ("MissingPhoto.jpg").
I'm hoping there's an easy way to do that maybe in the EVAL code but I don't
know how. Can someone help me out?
Thanks,
Keith
an asp image object if the file is missing. Here's my asp.net 2.0 markup:
<asp:Image ID="imgGrad" runat="server" BorderColor="DimGray"
BorderStyle="Solid" BorderWidth="1px" Height="120px" ImageUrl='<%#
"~/Images/ClassmatePics/" & Eval("GradPhotoFileName") %>' ToolTip="Click to
enlarge" /></td>
"GradPhotoFileName" is stored in a field in a table. If the file name stored
in the table is "JeffJones.jpg" but there is no "JeffJones.jpg" file in the
"~/Images/ClassmatePics/" folder then I have a dummy jpg image that I want
to show ("MissingPhoto.jpg").
I'm hoping there's an easy way to do that maybe in the EVAL code but I don't
know how. Can someone help me out?
Thanks,
Keith