GetAllContent

GetAllContent 메서드는 컨텐트 일정 파일에서 모든 HTML 컨텐트 문자열을 찾아서 각 항목 뒤에 <HR> 태그를 붙인 목록으로 웹 페이지에 직접 씁니다.

일반적으로 이 메서드는 컨텐트 일정 파일을 작성할 때 수정하기 위해 사용합니다.

구문

ContRot .GetAllContent ( content-schedule-path )

매개 변수

content-schedule-path
컨텐트 일정 파일의 위치를 지정합니다.

이 매개 변수를 상대 또는 가상 경로 중 하나로 지정할 수 있습니다. 예를 들어, 컨텐트 일정 파일(ContRot.txt)과 GetAllContent를 호출한 .asp 파일은 모두 /MyApp/Data/(여기서, MyApp는 서버상에서 가상 루트임) 디렉터리에 있는 경우 content-schedule-path에 전체 가상 경로(/MyApp/Data/ContRot.txt) 또는 상대 경로(ContRot.txt)를 지정할 수 있습니다.

ContentRotator 개체는 Server.MapPath 메서드를 호출하여 지정된 경로를 실제 디렉터리에 매핑합니다. 자세한 내용은 Server 개체 참조 페이지를 참조하십시오.

반환 값

없음

참고

Content Rotator 구성 요소는 Response.Write 메서드를 사용하여 GetAllContent 메서드를 호출한 .asp 페이지에 직접 출력합니다. 자세한 내용은 Response 개체 참조 페이지를 참조하십시오.

예제

다음은 GetAllContent 메서드를 사용하여 컨텐트 일정 파일에 있는 모든 항목을 화면에 표시하는 예제입니다.

--- ContRot_AllContent.asp ---

<H1>Tips Stored in the Content Schedule File:</H1>
<% Set objContRot = Server.CreateObject("MSWC.ContentRotator") %>
<%=objContRot.GetAllContent("/Data/ContRot.txt") %>
 

앞의 예제는 아래와 같은 HTML을 출력합니다.

<H1>Tips Stored in the Content Schedule File:</H1>
<hr>
Don't run with scissors.
<hr>
<FONT FACE="ARIAL,HELVETICA" SIZE="2">
  Be like a
  <H1>duck</H1>
  calm on the surface, paddling like mad underneath.
</FONT>
<hr>
<IMG SRC="http://zone.msn.com/graphics/hotgames_msn.gif">
<hr>
Here's the <A HREF="/data/controt.txt">secret link</A> to your content file.
<hr>
 

© 1997-2001 Microsoft Corporation. All rights reserved.