Forums
This topic is locked
Images in a conditional region
Posted 23 Jun 2004 07:23:10
1
has voted
23 Jun 2004 07:23:10 David Forshaw posted:
HiIn ASP VB Script.
Can you place images from a recorset in a conditional region?
Its not happening for me <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>
Here is my code:
<% if rsDetails.Fields.Item("detailedImage".Value <> "" then ' Adv
Conditional Region %>
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td><img
src="<%=(rsDetails.Fields.Item("detailedImage".Value)%>"
class="imageBorder"></td>
</tr>
</table>
<% end if ' rsDetails.Fields.Item("detailedImage".Value
<> "" %> <br>
Its not working with the conditional region just aroung the image also.
All I get from this is the dreaded little red box. But the images displays
correctly when the region is not there.
Thanks
Enzo
Replies
Replied 23 Jun 2004 11:42:07
23 Jun 2004 11:42:07 Simon Martin replied:
Sure can...
Why have you got that last line in there after the end if though?
My code below shows an image if it exists in a recordset, otherwise it just displays a default graphic
<% If rsUserproperty.Fields.Item("picture".Value <>"" Then %>
<img src="photos/<%=(rsUserproperty.Fields.Item("picture".Value)%>" width="200" />
<% Else %>
<img src="images/wireframe.gif" />
<% End If %>
HTH
Simon
Edited by - ganseki on 23 Jun 2004 11:43:47
Why have you got that last line in there after the end if though?
My code below shows an image if it exists in a recordset, otherwise it just displays a default graphic
<% If rsUserproperty.Fields.Item("picture".Value <>"" Then %>
<img src="photos/<%=(rsUserproperty.Fields.Item("picture".Value)%>" width="200" />
<% Else %>
<img src="images/wireframe.gif" />
<% End If %>
HTH
Simon
Edited by - ganseki on 23 Jun 2004 11:43:47