ASP adrotator component

Posted on 1998-09-27
Last Modified: 2013-12-25
Im trying to set up the adrotator component as a temporary ad-rotation solution....but am have problems getting the image to link correctly.   Would someone please take a look at (specifically the banner on the main page)?   ASP source for invoking adrotator shown below:

Dim AdVar, AdObj
Set AdObj = Server.CreateObject("MSWC.AdRotator")
AdVar = AdObj.GetAdvertisement("adsched.txt")
Response.Write AdVar
Question by:eason
  • 3
  • 2
LVL 10

Expert Comment

ID: 1855287
The problem that I saw was the addition of the "image=" in the <A> tag of you ad.  But, the way that you make it go the the correct place is with this ASP code at the top of your page.

GoToURL = Request.QueryString("URL")
If GoToURL <> "" then Response.Redirect GoToURL

This will redirect the page to the appropriate ad page if there is a URL.. obviously, when you load you page, there is no "URL=" in the address string...

As for the image in your <A, I would have to see your actual ASP code that adds the ad to your page.


Author Comment

ID: 1855288
Already tried this (the response.redirect).  The linked URL is as follows:

The fact that the url doesnt include index.asp is what is gumming up the works.  Any thoughts?  My scheduler file is set up correctly (to the best of my knowledge), but if you'd like to take a look, send your email address to

LVL 10

Accepted Solution

MasseyM earned 100 total points
ID: 1855289
Add this line to the VERY top of your Ad Rotator Schedule file.

REDIRECT /path/adredirect.asp

Make an ASP page called adredirect.asp in that path and within it, include this:


Author Comment

ID: 1855290
The ASP book I have mentioned something about listing a redirect file in the scheduler header, but never really went into it.

Thanks for the help.
LVL 10

Expert Comment

ID: 1855291
What book do you use?  I use Professional Active Server Pages 2.0 from WQrox Press... It has to be the BEST ASP book I have ever found

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
"Go Fund Me" type plugin 5 25
Changing Web Hosts: Need Your Expert Opinion & Ideas 6 41
Create animated movies for web page 18 90
Connection to multiple databases 13 26
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn how to dynamically set the form action using jQuery.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question