Re: Alternate for red cross -
08-03-2003
, 09:25 AM
"David R. Wheeler" <dont-want (AT) no (DOT) spam> wrote
Since you haven't said what server model you are using, this is how to
display an alternate image in ASP/VBScript
<%If rsName.Fields.Item("imgName").Value <> "" Or
IsNull(rsName.Fields.Item("imgName").Value) Then %>
<img src="path/<%=(rsName.Fields.Item("imgName").Value)%>">
<% Else %>
<img src="path/noimage.gif">
<%End If %>
If I understand what was wanted, that won't quite do it. Uzair said that, if
the path/file name IS there, but the image file is not, he wants to display
alternate or no content. I don't have my VBScript reference here, so I
cannot give the code, but I believe you'll need the FileSystemObject to
check to see if the file exists. Presumably, that would be done in the IF
portion of your construct.
Gary |