QuadComm e-commerce solutions
![]()
|
|
|||||||||||||||||||
|
||||||||||||||||||||
|
ASP Tip: Display a random fileWhen doing this web site I wanted to display certain random ads like the book selection that appears always in the right hand bar. Every ad has its own file which contains the HTML code for the ad (image, description and a link). To display a random ad I use an include file that opens a random file and displays its content. The text files have the following format: number.txt (1.txt, 2.txt,...) This is the include file used:
<%
Download the text file here. The last step is to include the file wherever you want to display the file: <!--#include file="randomfile.asp"-->
I hope you find this useful!Author: Carlos Baez You can also submit your own code examples. Just e-mail them. Read the disclaimer. |
|