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.
The problem is that if I replace
with
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
Code:
<%
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
Code:
response.write "<img src='file.asp?ID=1'/>"
with
Code:
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