- ASP - Read/Write
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·What's New?
Mail List


Impression Counter (With a db)
What's behind an image?  Just about anything you there to be including a db. A typical image tag (<img src="any_name_you_want.jpg">) downloads an image to be processed by the browser an image tag that references an active server page (<img src="any_name_you_want.asp">) can do most anything and output an image to be displayed as the final output to the user.  The following example will add one to an Access db (to count the number of impressions).  The Access db will also add when the impression occurred automatically and redirect will send the user to an image to be displayed in the browser.  Note the url in the output example.  To view the current impression count from the Access db click here.
View the Output
Text View
Print View
Mail this Link
Download the Code
View the Data

' name of the db that will track the numbrer of impressions
cn="DRIVER={Microsoft Access Driver (*.mdb)};"
cn=cn & "DBQ=" & server.mappath(accessdb)
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "insert into impressions (count) values(1)" 
rs.Open sql, cn
' redirect to the image you want to display
response.redirect "images/codeave-logo.gif" 




ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement is hosted by
    Donate Food Online with a Mouse Click at
    Donate Land Online with a Mouse Click at
    © 1999 - 2018
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3