|
The ChooseContent method retrieves an HTML content string from the Content Schedule file. The method retrieves a new content string each time the script is run, such as when a user opens or reloads a page.
content-schedule-path
Specifies the location of the Content Schedule file.
This parameter can be specified either as a relative or virtual path. For example, if the Content Schedule file, Content.txt, and the .asp file that called ChooseContent both resided in the directory /MyApp/Tips/, where MyApp is a virtual directory on the server, then either the full virtual path (/MyApp/Tips/Content.txt) or the relative path (Content.txt) could be specified for content-schedule-path.
The ContentRotator object calls the Server.MapPath method to map the specified path to a physical directory. For more information, see the Server Object reference pages.
Returns an HTML content string from the Content Schedule file.
The following example gets a new tip from the Content.txt file in the /Tips/ virtual directory.
<%
Set NextTip = Server.CreateObject("MSWC.ContentRotator")
Tip = NextTip.ChooseContent("/Tips/Content.txt")
Response.Write Tip
%>
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.