Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
This snippet shows how to rotate ads/images on you...
Author:
Peter Riley
E-mail:
Click to e-mail author
Submitted:
4/27/2000
Version:
ASP
Compatibility:
ASP
Category:
ASP
Views:
14382
This snippet shows how to rotate ads/images on your ASP pages using the AdRotator component.
Declarations:
'none
Code:
'The following code shows how to rotate Ads or images 'on an ASP page. 'First create a rotator schedule text file with 'the following format: redirect myredirect.asp 'File which implements redirection width 110 'width of ad or image height 140 ' height of ad or image border 0 ' width of border * 'the asterisks seperates the two sections image1.gif 'the banner ad or image to display myadurl.asp ' the redirect file for the ad Alternate text for nongraphic browsers goes here 4 'this is the weight for the ad: 4/10 image2.gif 'second image myadurl2.asp 'second redirect file Alternate text for nongraphic browsers goes here 6 ' the weight for the ad: 6/10 'save this text file as adrotator.txt ****************************************************** 'Next you need to create the redirection file 'as follows: <% Dim Address Address = Request.QueryString("url") Response.Redirect Address %> 'give this file the same name as the file name 'entered in the schedule.txt file, ie. myredirect.asp ***************************************************** 'Finally, we enter the following ASP code on the page 'we wish to rotate the ads/images: <% Dim varAd, objAd set objAd = Server.CreateObject("MSWC.AdRotator") varAd = objAd.GetAdvertisement("adrotator.txt") Response.Write varAd %>
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2023 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement