|
|
Home » ASP » Article
Banner Ad Rotator
|
| Article by: | Art Downey (3/20/2003) |
|
| Sponsored by: | FindMyHosting - Web Hosting Search |
| Summary: | An introduction to the Microsoft AdRotator component which ships with IIS and is the simplest way to implement banner ad rotation on your site. |
|
| Viewed: 20874 times |
Rating (38 votes): |
|
4.5 out of 5 |
|
|
|
Banner Ad Rotator
The default installation of IIS comes with a Microsoft banner ad component called AdRotator. To use the component, the first thing we need to do is create a text file in the following format:
We'll call this file banner_ads.txt
Now let's take this apart. The redirect line we'll come to in a moment. The next three lines are the width, height and border of the ad - all obvious enough. Next, a compulsary star. Then follow image path, link , alt text and percentage shown for the first banner, followed by the same for the next banner. This text file would therefore show 80% CodeToad banners, and 20% Google. You can have as many banners as you like.
Now back to the redirect line. You'll notice the page name ads.asp. This is a name I made up and it can be any asp page you create. This page will now receive a querystring with a variable named URL containing the URL to redirect to.
If that's all we want to do we would simply add the following code to the ads.asp page:
|
Select All Code
|
|
But this would be the place to monitor click throughs and statistics should you wish to do so, perhaps by storing the url in a database.
Calling the ads
So that's the system set up, now all we need to do is call the banner from our page. That's just like calling any other component:
|
Select All Code
|
|
The MSWC.AdRotator object is created, and goes to the banner_ads.txt file to read off the details of the ads, and display one, according to the percentages. It's as easy as that.
|
|
View highlighted Comments
User Comments on 'Banner Ad Rotator'
|
Posted by :
Archive Import (Ray Middleton) at 14:32 on Friday, May 30, 2003
|
hiya
ive followed the code exactly and all works fine, except for the url for the mouse over and execution of link.
i end up gettin url's like:
http://www.renaultsportsclub.co.uk/ads.asp?url=http://www.fastandfuriousshow.co.uk/&image=../mainimages/f_f_banner2211.gif
instead of just http://www.fastandfuriousshow.co.uk
could u please guide me as to what i am doin wrong.
many thanks
Ray
| |
Posted by :
Archive Import (jake) at 10:45 on Monday, June 09, 2003
|
I am having exactly the same problem as the poster above.
When clicking the image it doesnt work as expected.
| |
Posted by :
Archive Import (dholder) at 15:04 on Monday, September 15, 2003
|
make sure your redirect file is uploaded and its linked in the schedule file.
| |
Posted by :
MSpoon at 20:33 on Thursday, October 23, 2003
|
Hi all,
Are there any tutorials out there that show how to actually track impressions and clicks on the ads that are served with this component.
I have the component working fine, but I want to be able to check how many times an ad has been served and clicked on.
Thanks for any ideas.
MSpoon
| |
Posted by :
bintababe at 12:00 on Tuesday, October 23, 2007
|
Hello my dear
compliment of the day.
my name is Binta,i am happy to contact you with all my heart,sorry to hear that a girl like me is searching for love,but i believe and i think that we can make it together,please i will like you to email me back if you real interested in my love, I believe we can move from here. I will be waiting to receive your lovely reply soonest,where i can give you my picture for you to know whom i am please contact back also with love from your heart,
thanks with love from my heart.
Binta
| |
|
To post comments you need to become a member. If you are already a member, please log in .
| |