YouTip LogoYouTip

Asp Adrotator

```html ASP AdRotator

ASP AdRotator

-- Learn not only technology, but also dreams!

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 Emails

ASP 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 ADO

ASP Components

ASP AdRotator ASP BrowserCap ASP Content Linking ASP Content Rotator

ASP and AJAX

AJAX Introduction ASP - AJAX AJAX Database

ASP Summary

ASP Quick Reference ASP Summary

ASP Examples

ASP Examples ASP ADO ASP Browser Capabilities

ASP 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.

```
← Asp BrowserAsp Ado β†’