Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have the following code which is calling an asp file that displays and image from my database. The ID value in the img src tag is the image number from the database. The code below works fine, but as you can see it is always calling ID=1 and not using the ID variable.

 

<%
Dim ID
ID = Request("ID")

response.write "<html>"
response.write "<body>"
response.write "<img src='file.asp?ID=1'/>"
response.write "<p align='center'>"
response.write "<b>Showing Binary Data from the Database  '" & ID & "'</b><br>"
response.write "</a></p>"
response.write "</body>"
response.write "</html>"
%>

 

The problem is that if I replace

 

response.write "<img src='file.asp?ID=1'/>"

 

with

 

response.write "<img src='file.asp?ID='" & ID & "'/>"

 

it does not display a picture, can anyone help please, I have tried a number of combinations but can't figure this one out

 

Cheers

 

Simon

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...