Microsoft KB Archive/310633

= HOW TO: Use the ASP ContentRotator Object in FrontPage 2000 =

Article ID: 310633

Article Last Modified on 6/29/2007

-

APPLIES TO


 * Microsoft FrontPage 2000 Standard Edition

-



This article was previously published under Q310633



For a Microsoft FrontPage 2002 version of this article, see 318282.

IN THIS TASK
SUMMARY
 * Creating a Content Schedule File
 * Creating a Page by Using the Content Rotator Component
 * Using the Content Rotator on the Page
 * Saving and Previewing the Page

MORE INFORMATION REFERENCES



SUMMARY
Use this step-by-step guide that describes how to use the Content Rotator installable component for Active Server Pages (ASP) in Microsoft FrontPage. The Content Rotator automates the rotation of HTML content strings on a Web page.

back to the top

Creating a Content Schedule File
The Content Schedule file contains information that the ContentRotator object uses to manage and display the specified content. In an entry, the double percentage signs (%%) denote the separation of each content section and double slashes (//) indicate a comment. For additional information about the Content Schedule file, see the following Microsoft Web site:

Content Schedule File

 Start FrontPage and then open a Web on a Web server running Internet Information Services (IIS). On the Standard toolbar, click the New Page button. Switch to HTML View. On the Edit menu, click Select all. Press DELETE.  Type the following text: %% // This is a simple text example: Don't run with scissors.

%% // This is an example of a quotation: If the past 20 years have been impressive, the next 20 will be astounding. --Bill Gates

%% // This example contains an image: MSN - The Internet from Microsoft 

%% // This example contains a URL: Where do you want to go today? www.microsoft.com </li> On the File menu, click Save.</li> Name the file ContentRotator.txt .</li> In the Files of type list, click All Files (*.*).</li> Click Save.</li> On the File menu, click Close.</li></ol>

back to the top

Creating a Page by Using the Content Rotator Component
<ol> On the Standard toolbar, click New Page to start a new page.</li> Switch to HTML View.</li>  Insert the following code before the opening <BODY> tag: <% Dim objContentRotator Set objContentRotator = Server.CreateObject(&quot;MSWC.ContentRotator&quot;) %> This code creates a ContentRotator object for later use. </li> Switch back to Normal View.</li></ol>

back to the top

Using the ContentRotator Object on the Page
<ol> Insert an HTML Markup Web component to add the ASP code that will use the ContentRotator object. To do this, perform the following steps: <ol style="list-style-type: lower-alpha;"> On the Insert menu, click Advanced.</li> Click HTML for the control.</li></ol> </li>  When the HTML Markup dialog box appears, type the following code: <%=objContentRotator.ChooseContent(&quot;/ContentRotator.txt&quot;)%> This ASP code retrieves a text entry from the content schedule file you created earlier. </li> Click OK to close the HTML Markup dialog box.</li></ol>

back to the top

Saving and Previewing the Page

 * 1) On the File menu, click Save.
 * 2) Name the file ContentRotatorTest.asp and click Save.
 * 3) On the File menu, click Preview in Browser.
 * 4) Click Preview.

You should see the text change as you refresh the page in your browser.

NOTE: If you change the fonts or colors for the page, the text output from the ContentRotator object also changes.

For more information about changing the fonts or colors, click Microsoft FrontPage Help on the Help menu, type fonts or colors in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

back to the top

ASP for IIS comes with several built-in objects, such as the Response and Request objects. In addition to these objects, IIS comes with several installable components that you can use with ASP.

back to the top

<div class="references_section">