GetAdvertisement

GetAdvertisement 메서드는 순환 일정 파일에서 그 다음 광고를 찾습니다. 사용자가 페이지를 열거나 새로 고칠 때처럼 스크립트가 실행될 때마다 메서드는 예약된 다음 광고를 찾습니다.

구문

AdRotator.GetAdvertisement( rotationSchedulePath )

매개 변수

rotationSchedulePath
가상 디렉터리에 대한 순환 일정 파일의 상대적 위치를 지정합니다. 예를 들어, 실제 경로가 C:\Inetpub\Wwwroot\Ads\Adrot.txt(Wwwroot가 "/" 가상 디렉터리인 경우)이면 \Ads\Adrot.txt를 경로로 지정해야 합니다.

반환 값

현재 페이지에 광고를 표시하는 HTML을 반환합니다.

예제

다음은 사용자가 웹 페이지를 볼 때마다 다른 광고를 표시하도록 모든 속성을 설정하는 예제입니다.

--- AdRot.asp ---

<% 
Set ad = Server.CreateObject("MSWC.AdRotator") 
ad.Clickable = True
ad.Border = 1
ad.TargetFrame = "target=_TOP"
Response.Write ad.GetAdvertisement("adrot.txt") 
%>

다음 HTML은 GetAdvertisement 메서드에 의해 작성되고 페이지의 출력에 추가되어 순환 일정 파일에 있는 그 다음 광고를 표시합니다.

<A HREF="adredir.asp?url=http://www.microsoft.com/windows2000/guide/professional/overview/&image=http://www.microsoft.com/library/homepage/images/init_win2k.gif" TARGET="target=_TOP"><IMG SRC="http://www.microsoft.com/library/homepage/images/init_win2k.gif" ALT="Introducing Microsoft Windows XP Professional!" WIDTH=340 HEIGHT=100 BORDER=1></A>
 

© 1997-2001 Microsoft Corporation. All rights reserved.