Print Page | Close Window

Dynamic images

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=9398
Printed Date: 01 April 2026 at 1:00am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Dynamic images
Posted By: rosejr
Subject: Dynamic images
Date Posted: 30 January 2004 at 5:24pm

I'm developing a site where I am going to put the entire page header into a include file.  But the problem is that in that each page has its own header image.  Is there a script or any way to dynamically change the image based on what page is selected?

Thanks

 

 




Replies:
Posted By: MorningZ
Date Posted: 31 January 2004 at 8:36am

Case Select Which Page
     Case ThisPage
          SomeValue = "ThisGraphic.jpg"
     Case ThatPage
          SomeValue = "ThatGraphic.jpg"
Case Else

later on.....

<img src="<%= SomeValue %>"/>

 



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Semikolon
Date Posted: 31 January 2004 at 9:16am

or you can add

     Const strImage = "image.gif"

above the included header file and then

     <img src="<% = strImage %>" />

to the header include file




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net