Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

HOW TO: Use the ASP ContentRotator Object in FrontPage 2000


View products that this article applies to.

This article was previously published under Q310633

↑ Back to the top


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.

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:
  1. Start FrontPage and then open a Web on a Web server running Internet Information Services (IIS).
  2. On the Standard toolbar, click the New Page button.
  3. Switch to HTML View.
  4. On the Edit menu, click Select all. Press DELETE.
  5. 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.<br><br>
    --<i>Bill Gates</i>
    
    %% // This example contains an image:
    MSN - The Internet from Microsoft<br>
    <img src="http://msimg.com/w/logo.gif">
    
    %% // This example contains a URL:
    Where do you want to go today?<br>
    <a href="http://www.microsoft.com">www.microsoft.com</a>
    					
  6. On the File menu, click Save.
  7. Name the file ContentRotator.txt.
  8. In the Files of type list, click All Files (*.*).
  9. Click Save.
  10. On the File menu, click Close.

Creating a Page by Using the Content Rotator Component

  1. On the Standard toolbar, click New Page to start a new page.
  2. Switch to HTML View.
  3. Insert the following code before the opening <BODY> tag:
    <%
      Dim objContentRotator
      Set objContentRotator = Server.CreateObject("MSWC.ContentRotator") 
    %>
    						
    This code creates a ContentRotator object for later use.
  4. Switch back to Normal View.

Using the ContentRotator Object on the Page

  1. Insert an HTML Markup Web component to add the ASP code that will use the ContentRotator object. To do this, perform the following steps:
    1. On the Insert menu, click Advanced.
    2. Click HTML for the control.
  2. When the HTML Markup dialog box appears, type the following code:
    <%=objContentRotator.ChooseContent("/ContentRotator.txt")%>
    						
    This ASP code retrieves a text entry from the content schedule file you created earlier.
  3. Click OK to close the HTML Markup dialog box.

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.





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


References

For additional information about installable components for ASP, visit the following Microsoft Web site:







↑ Back to the top


Keywords: KB310633, kbhowtomaster, kbhowto

↑ Back to the top

Article Info
Article ID : 310633
Revision : 3
Created on : 6/29/2007
Published on : 6/29/2007
Exists online : False
Views : 200