Print Page | Close Window

Display images

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=1143
Printed Date: 29 March 2026 at 9:20am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Display images
Posted By: LeoV
Subject: Display images
Date Posted: 19 March 2003 at 7:52am

I do have some problems when displaying images. I past the url for the image into an access database. What i want is display the image in a table.

But whatever i try i keep having problems with the image.

The  asp code is below:

<TABLE BORDER="1" cellspacing="1" cellpadding="10"%>

<%

'Loop through the recordset

Do While not rsVerfWereld.EOF

'Write the HTML to display the contents of the recordset

Response.Write ("<TR>")

Response.Write ("<TD>")

Response.Write (rsVerfWereld("Fabrikant"))

Response.Write ("</TD>")

Response.Write ("<TD>")

Response.Write (rsVerfWereld("P_naam"))

Response.Write ("</TD>")

Response.Write ("<td>")

Response.Write ("<img src="<%= rsVerfWereld("P_img") %>" >")

Response.Write ("</td>")

Response.Write ("</TR>")

'Move to the next record in the recordset

rsVerfWereld.MoveNext

Loop

%>

</TABLE>

Can somebody please help me with this code?? What am i doing wrong?? I keep getting errors..............

Thanx in adventage.

 

 




Replies:
Posted By: michael
Date Posted: 19 March 2003 at 3:56pm
Not knowing what your errors are I take a wild guess. Try the following:
Response.Write ("<img src=""" & <%= rsVerfWereld("P_img") %> & """ >")


Posted By: LeoV
Date Posted: 20 March 2003 at 7:56am

Thanks for your support but the problem is still not fixed..:(

The error i now get is:

Soort fout:
Compilatiefout Microsoft VBScript (0x800A03EA)
Syntaxisfout
/Admin/display.asp, line 46, column 32
Response.Write ("<img src=""" & <%= rsVerfWereld("P_img")
-------------------------------^

Sorry for the dutch....

So, if someone still has some ideas, please...tell me



Posted By: MorningZ
Date Posted: 20 March 2003 at 9:02am
The right syntax is:

Response.Write("<img src=""" & rsVerfWereld("P_img") & """ >")

-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Morgan
Date Posted: 21 March 2003 at 12:45am

OR...

<TABLE BORDER="1" cellspacing="1" cellpadding="10">
<%
'Loop through the recordset
Do While not rsVerfWereld.EOF
    'Write the HTML to display the contents of the recordset
%>

  <TR>
    <TD><% =rsVerfWereld("Fabrikant") %></TD>
    <TD><% =rsVerfWereld("P_naam") %></TD>
   
<TD><img src="<% =rsVerfWereld("P_img") %>" ></TD>
  </TR>

<%
    'Move to the next record in the recordset
    rsVerfWereld.MoveNext

Loop
%>

</TABLE>



-------------
Morgan



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net