ASP Lecture Series (11) ActiveX Components
Author:Eve Cole
Update Time:2009-05-30 19:59:03
This section provides an overview of the ActiveX components in Active Server Pages (ASP).
ActiveX components run on a Web server as part of a Web-based application. Components provide the main functionality of an application (such as accessing a database) so that you do not have to create or recreate the code that performs these tasks.
Database Access You can use the Database Access component to access databases from within your application. You can then display the entire contents of the table, allowing the user to construct queries and perform other database queries on the Web page.
Ad Rotator
You can use the Ad Rotator component to alternate the display of images and provide a link from the displayed graphic to another URL. Save a list of ads in a text file; the Ad Rotator component displays them according to instructions in the data file.
Content Rotator
The Content Rotator component automatically rotates HTML content strings on Web pages. Each time a user requests a Web page, the Content Rotator component displays a new HTML content string based on the information specified in the Content Schedule file.
Because content strings can contain HTML tags, you can display any content type that HTML can represent: text, graphics, or hypertext links. For example, you can use this component to cycle through daily quotes or hypertext links, or change the color of text and background each time a Web page is opened.
Browser Capabilities
By using the Browser Capabilities component, you can tailor the content sent to the browser based on its capabilities.
File Access
The File Access component provides objects that can be used to retrieve and modify files in the computer's file system.
Content Linking
The Content Linking component makes it simple to provide logical navigation of .asp files in your application. Instead of maintaining URL references in many .asp files, you only need to specify the sequential organization of the .asp files in an easy-to-edit text file.
Collaboration Data Objects for Windows NT Server
The Collaboration Data Objects for NTS component provides mail objects used by Web applications. This library allows you to quickly and easily add email functionality to your application. You can create programmable mail objects and then use their properties and methods to meet your application's needs.
MyInfo, Status, System and Tools
The MyInfo, Status, System, and Tools components provide compatibility for applications developed on the Macintosh and on computers running Microsoft Windows.
The MyInfo component tracks personal information about the Web site owner, such as the name and address of the organization that operates the Web site, the Web site's settings, and whether the Web site has a guest book.
The Status component tracks Web site information, such as the number of visitors and the number of HTTP connections.
The System component creates a status object that contains server status information. Currently this server status is only available on Personal Web Server for Macintosh.
The Tools component provides methods to generate random numbers, check whether a file exists, or process HTML tables.
Page Counter
The Page Counter component counts and displays the number of times a Web page has been requested. At certain intervals, the captured numbers are written to a text file so that the data is not lost even if the server is shut down.
Permission Checker
The Permission Checker component tests a Web user's access rights to a file or page. You can use the Permission Checker component to customize ASP-based pages for different types of users. For example, if a Web page contains hypertext links, you can use the Permission Checker component to test the user's access rights to the corresponding Web page and ignore pages that the user does not have permission to access or invalidate these links.