The practical advertisement alternation component in the advertisement ASP
2000-06-14 · Wodeail Cpcw
Do you often see some of the company's ads online, and they can constantly change the various advertising content, this is the use of ASP's advertising alternating components, the use of alternating advertising components alternate advertising icon can better release your advertising and service promotion, easier to make others accept your ads, and can simply realize alternating display image.
(i) The usage and specific properties of the advertising alternating component:
1). GetAdvertisement method
Here the Server.CreateObject method is used for advertising alternating examples: Set ad=server.createobject ("MSWC. Adtotator "), where the SET command is used in conjunction with the Server.Create.CreateObject marker to create a reference to a Mswc.adrotator object. Advertising alternating components have a method: GetAdvertisement method. GetAdvertisement method manages and checks information from the dispatch file, when the GetAdvertisement method is invoked from a new page request or a request that is updated from a page. The GetAdvertisement method browses the dispatch file to display the next advertisement pattern, the syntax of the GetAdvertisement method is: getadvertisement ("filepath"), FilePath is the virtual path of the dispatch file.
2). Documents required for alternating advertising components
Rotation schedule file to manage the display frequency or display the title of the file (that is, ad alternate scheduling file); Redirection files are redirected to their URLs.
3). The specific method attribute of ad alternate dispatch file
This file is used to manage the frequency and specific attributes of advertising in an alternating component of an ad, as shown in the following table:
The name describes the function range
Redirect (URL) all images in the alternate schedule for submitting the browser default location all images
Width (fill in the exact size of the image to be displayed) set the pixel width of the image all images
Height (pixel value) set the pixel heights of the image all images
Border (table width) Set image border width all images
* Used to separate all images of specific display content
Adul Set Picture address a single image
Adhomepageurl set AD link address single image
Text set ad text to display a single image
Impresseions Set advertising picture display time than a single image
For specific examples, please see the following example
4). redirect File
The redirected file (redirection) will cause the browser to point to the destination address, where the address is determined in the dispatch file. This redirection file is used not only to point the requesting customer to the requested advertisement, but also to store various information about the requesting customer, such as the type of browser and IP address. This is where the browser is directed to the address specified in the dispatch file, such as Response.Redirect (Request.QueryString ("Myadurl"), in the Response.Redirect method. In addition, you can use a variety of analysis code or page register components to determine the number of clicks on redirected files.
5). Advertising Alternating properties
Name Syntax description
Border boarder (size), size set advertising border width with integers
Indicates border thickness
Clickable clickable (value), value is to set whether the ad alternating title is a hyperlink or image
True or False
TargetFrame TargetFrame (frame), frame set the name of the target and display the title
is the name of an HTML box (such as
_top,_parent, etc.)
Here if the clickable value is set to True, the caption of a hyperlink is displayed. If the value is false, only the caption is displayed and the label is canceled
The super join of the question.
(b). Specific Use examples:
1). The following code can be placed where you need to add a banner
<
Dim Ad,adrot
Ad= "Adr.txt"
Set Adr=server.createobject ("MSWC. ADROTATOR ")
Adr.targetframe= "target=" "Adframe" ""
' Read the Dispatch file Adr.txt
Response.Write ADR. GetAdvertisement (AD)
>
2. The following is the ad dispatch file Adrot.txt, which represents the properties of the image that can be displayed.
The ' redirect option declares a file that transfers the address, which specifies the path of the user to the target.
REDIRECT Goto.asp
' Define the size and border properties of the advertisement image
Width 468
Height 60
Border 0
*
' Specify the picture address, the link address and the hint content, and the time displayed (where the time display ratio is 50).
logo.gif
Http://www.yesky.com
Tenkine
50
REDIRECT Goto.asp
Border 0
*
Http://localhost/logo.gif
Http://aasp.yeah.net
ASP Dynamic Network pioneer
50
REDIRECT Goto.asp
Border 0
The same can be used to separate different picture address and link address to achieve the advertising alternating effect.
3. goto.asp, an ASP file for the transfer address, is an ASP file that specifies the user's route to the appropriate URL (user routing table) parameter.
<
< @LANGUAGE = "VBSCRIPT" >
Response.appendtolog request.querystring ("url")
Response.Redirect request.querystring ("url")
>
This transfer address file is considered to be a memory device for tracking the usefulness of the tag and also provides the number of times the tag was clicked. It uses the Request.redirect method to redirect the browser to the specified URL route.
OK, now a simple advertising system with automatic rotation function is completed, it can be used on its own home page automatically show the original definition of advertising content and picture links, if you need to also exchange websites with other advertising content, such a simple and practical program you do not want to try it?