lidds Posted May 4, 2005 Posted May 4, 2005 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 Quote
penfold69 Posted May 4, 2005 Posted May 4, 2005 use: response.write "<img src='file.asp?ID=" & ID & "/>" Quote
lidds Posted May 4, 2005 Author Posted May 4, 2005 penfold69, this still does not display the image??? Quote
lidds Posted May 4, 2005 Author Posted May 4, 2005 fixed it response.write "<img src=""file.asp?ID=" & ID & """/>" Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.