ServersImages in ASP

Images in ASP

ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

by Armand Datema

Here is a new tutorial on how to include images in ASP. Without using blobs or binary

Here is a new tutorial on how to include images in ASP.

First we start of with the basic HTML


Now lets create the database connection

set conntemp=server.createobject(“adodb.connection”)
Set con =

Now lets open the database connection,
create the SQL Statement and open the result set,  my
ODBC name here is image and the table i am
going to query is called image

Set rs =
rs.Open “select *
from image”, con
do While not rs.EOF

The code so far
was pretty standard, creating a connection, opening recordset
and run the query. Now lets go to te interesting part, how to
add the images 🙂

First we need to add a bit
HTML code for the table display

Now lets finish the rest
of the code and close the HTML tags.


In the next cell you see the

In the next part of the
code we write the name of the image as plain text.

Some extra HTML code for
the table display


Now we add the image, as you can see
from the line code below, its actually very easy, just put the
response.write … in the place of where you would normally
put the name of the image.  

.gif” width=”100″

Get the Free Newsletter!

Subscribe to Daily Tech Insider for top news, trends & analysis

Latest Posts

Related Stories