[This is preliminary documentation and subject to change]

## Content Schedule File

The Content Schedule file contains information that the Content Rotator Component uses to manage and display the specified content.

In this file you include any number of HTML content string entries. Each entry consists of two parts. The first part is a line that begins with double percentage signs (%%) and contains both the relative weight and any comments. Each item on these lines must be separated by a TAB character. The second part contains the HTML content itself. Each line ends in a carriage return.

After you change the Content Schedule File, the IIS Services may need to be restarted to pick up the change

###### Syntax

%% [#Weight] [//Comments]

ContentString

###### Parameters

Weight
  This optional parameter specifies a number between 0 and 10000 that indicates the relative weight of the HTML content string. The probability of a particular content string being displayed by the Content Rotator Component can be expressed as the Weight of that content string divided by the sum of Weight values for all entries in the Content Schedule file.

  For example, if a Content Schedule file contained three content strings with respective weights of 1, 3, and 4, the Content Rotator displays the first content string one-eighth of the time, the second string three-eighths of the time, and the third string half of the time.

  A Weight of 0 will cause a content entry to be ignored.

  If Weight is not specified, the default value is 1.

  If the sum of all weight values exceeds 10000, an error will be generated when the schedule file is accessed by a call to either the GetAllContent or ChooseContent methods.

Comments
  This optional parameter contains comments about the entry. These comments are for development use only and are not displayed to the user. If you require more than one line of comments, you must start each additional comment line with a line delimiter (%%) followed by a comment delimiter (//).
ContentString
  The HTML content that the Content Rotator Component displays. For example, you can present a line of text, an image, or a sound.

  ContentString may include one or more lines. The Content Rotator Component treats everything between blocks of double percent signs (%%) as a single HTML content string.

###### Example

The following is an example of a Content Schedule file. Note that because the content strings can contain HTML tags, you can display any type of content that can be represented with HTML, including text, images, and hyperlinks.

--- ContRot.txt ---

    %% // Because no value is set for Weight, the default value is 1.
    Don't run with scissors.

    %% #2 // Content can be more that one line long.
    %% // Additional line of comments.
    %% // Yet another line of comments.
    <FONT FACE="ARIAL,HELVETICA" SIZE="2">
      Be like a
      <H1>duck</H1>
      calm on the surface, paddling like mad underneath.
    </FONT>

    %% #3 // This is our favorite image, so show it most often.
    <IMG SRC="http://zone.msn.com/graphics/hotgames_msn.gif">

    %%
    Here's the <A HREF="/data/controt.txt">secret link</A> to your content file.

© 1997-2001 Microsoft Corporation. All rights reserved.