code for displaying images

Results 1 to 2 of 2

Thread: code for displaying images

  1. #1
    Join Date
    Dec 1969

    Default code for displaying images

    Hi, i&#039;m trying to find the code will display an image url from a database on a web page. <BR><BR>I&#039;m selecting the id number of the info i want to view from within the database through the usual method - <BR>a href="test.asp?ID=23"<BR><BR>On the test.asp i have my query code:<BR>strSQL = "SELECT tblComments.* FROM tblComments WHERE ID_no=" & lngRecordNo<BR><BR>Where lngRecordNo holds the record number to be displayed. I then have a html table within which i display - &#060;% = rsGuestbook("Will") %&#062;, which shows the text within that record. This is where i get stuck: i then want to grap the image url from the database and display it within a img tag. My question is what code do i have to write for this to occur??<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: code for displaying images

    If it&#039;s an image URL then it&#039;s quite straightforward:<BR>&#060;img src="&#060;%=rsGuestbook("ImageURLField") %&#062;" /&#062;<BR><BR>Where "ImageURLField" is the name of the field containing the image URL.<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts