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:
- 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.<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>
- On the File menu, click Save.
- Name the file ContentRotator.txt.
- In the Files of type list, click All Files (*.*).
- Click Save.
- On the File menu, click Close.
back to the top
Creating a Page by Using the Content Rotator Component
- On the Standard toolbar, click New Page to start a new page.
- Switch to HTML View.
- 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. - Switch back to Normal View.
back to the top
Using the ContentRotator Object on the Page
- Insert an HTML Markup Web component to add the ASP code that will use the ContentRotator object. To do this, perform the following steps:
- On the Insert menu, click Advanced.
- Click HTML for the control.
- 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. - Click OK to close the HTML Markup dialog box.
back to the top
Saving and Previewing the Page
- On the File menu, click Save.
- Name the file ContentRotatorTest.asp and click Save.
- On the File menu, click Preview in Browser.
- 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