programmingsite : code , tutorials and scripts
Navigation

home


ASP
ASP.net
C
C++
C#
PHP
Java
JavaScript
Powershell
VB.net

Visual Basic


Resources
code
tutorials
training

Ads
Products

 

 

Create an Adrotator




Create an Adrotator

In this example we will create an adrotator using the Ad rotator component . We will show you the code in this example , in a future exercise we will explain in more detail all about using the Adrotator component.


Step 1 :

Save the following as adrotator.txt , create 3 gifs 480 by 60 called 02 , 03 and 04 , here are some examples I used before

***
REDIRECT adRedirect.asp
WIDTH 480
HEIGHT 60
BORDER 0
*
http://asp.myscripting.com/02.gif
http://asp.myscripting.com
Visit asp.myscripting.com
20
http://asp.myscripting.com/03.gif
http://vbscript.myscripting.com
visit VBScript site now
40
http://asp.myscripting.com/04.gif
http://javascript.myscripting.com
Javascript resource site
40
***

 



Step 2 :

Create your redirect file , in this case adRedirect.asp and enter the following

<%
Response.Redirect(Request.QueryString("url"))
%>

Step 3 :

Put this code on the pages you wish the banner to be displayed

<%
Dim objAdRotator
'create an instance of adrotator
Set objAdRotator = Server.CreateObject("MSWC.AdRotator")
'get the ad from the file
Response.Write objAdRotator.GetAdvertisement("adrotator.txt")
'destroy the object
Set objAdRotator = Nothing
%>





Products
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals
Asp Studio 2005
Xtra PHP
Online PHP Script Encoder
Comparison

Links
Make money selling software
Uk shopping
UK price comparison
US price comparison
free articles
free stuff
Gambling resources
Software directory
XBox cheats and more
Sexy free wallpapers
Hosting resources
Nintendo Wii info
Beginners PHP
Health and fitness
Domain names
Dating site
Nintendo DS resources
Dropshippers
Maxi directory
Perfume and fragrances
PC shopping, tips and info
Magazine superstore

Ads