I'm having trouble with this snippet of code.
All I'm trying to do is match a number from the database to an actual photo. If the photo doesn't exist I want to show a "Not Available" Photo.
This was very easy for me in ASP Classic, but I am having trouble in .net 2.0
<% Dim productImage As String
productImage = "images/products/" & 'DataBinder.Eva l(Container.Dat aItem, "mfgCode")' & "_s.jpg"
Dim imageFile As New FileInfo(produc tImage)
If Not imageFile.Exist s Then
Response.write( "<img src='images/products/na_s.jpg' />")
Else
Response.Write( "I Exist")
end if
%>
Any help is appreciated
All I'm trying to do is match a number from the database to an actual photo. If the photo doesn't exist I want to show a "Not Available" Photo.
This was very easy for me in ASP Classic, but I am having trouble in .net 2.0
<% Dim productImage As String
productImage = "images/products/" & 'DataBinder.Eva l(Container.Dat aItem, "mfgCode")' & "_s.jpg"
Dim imageFile As New FileInfo(produc tImage)
If Not imageFile.Exist s Then
Response.write( "<img src='images/products/na_s.jpg' />")
Else
Response.Write( "I Exist")
end if
%>
Any help is appreciated
Comment