ASP AdRotator
-- Learn not only technology, but also dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
ASP Tutorial
ASP Tutorial ASP Introduction ASP Installation ASP Syntax ASP Variables ASP Procedures ASP Forms ASP Cookies ASP Session ASP Application #include in ASP ASP Global.asa ASP Sending EmailsASP Objects
ASP Response ASP Request ASP Application ASP Session ASP Server ASP Error ASP FileSystem ASP TextStream ASP Drive ASP File ASP Folder ASP Dictionary ASP ADOASP Components
ASP AdRotator ASP BrowserCap ASP Content Linking ASP Content RotatorASP and AJAX
AJAX Introduction ASP - AJAX AJAX DatabaseASP Summary
ASP Quick Reference ASP SummaryASP Examples
ASP Examples ASP ADO ASP Browser CapabilitiesASP AdRotator Component
ASP AdRotator Component
The ASP AdRotator component creates an AdRotator object each time a user visits the website or refreshes the page, displaying a different image. Information about the images is contained in a text file.
Note: AdRotator does not work in Internet Information Server 7 (IIS7).
Syntax
<%
set adrotator=server.createobject("MSWC.AdRotator")
adrotator.GetAdvertisement("textfile.txt")
%>
ASP AdRotator Example
Assume we have a file named "ads.txt" as follows:
REDIRECT banners.asp
*
.gif
Free Tutorials from
50
xmlspy.gif
http://www.altova.com
XML Editor from Altova
50
In the above text file, the lines below the model specify the name of the image to be displayed, the hyperlink address, the alternate text for the image, and the display probability per hundred clicks.
The first line of the above text file specifies what action to take when a visitor clicks on the image. The redirect page (banners.asp) will receive a query string with the redirect URL.
```
YouTip