Monday, May 26, 2008

ASP Components

Different ASP Components are:
AdRotator
Content Rotator
Content Linking
Browser Capabilities

1. ADROTATOR:
The ASP AdRotator component creates an AdRotator object that displays a different image each time a user enters or refreshes a page.
Syntax:
set adrotator=server.createobject("MSWC.AdRotator")

adrotator.GetAdvertisement("textfile.txt")
Methods:
1. GetAdvertisement
Properties:
1. Border
2. Clickable
3. TargetFrame


2. CONTENT ROTATOR:
The ASP Content Rotator component creates a ContentRotator object that displays a different HTML content string each time a user enters or refreshes a page.
Syntax:
Set cr=Server.CreateObject( "MSWC.ContentRotator" )

Methods:
1. ChooseContent
2. GetAllContent


3. CONTENT LINKING:
The ASP Content Linking component is used to create a quick and easy navigation system!
The Content Linking component returns a Nextlink object that is used to hold a list of Web pages to be navigated.
Syntax:
Set nl=Server.CreateObject( "MSWC.NextLink" )

Methods:
1. GetListCount
2. GetListIndex
3. GetNextDescription

4. GetNextURL
5. GetNthDescription
6. GetNthURL
7. GetPreviousDescription
8. GetPreviousURL

4. BROWSER CAPABILITIES:
The ASP Browser Capabilities component creates a BrowserType object that determines the type, capabilities and version number of each browser that visits your site.

When a browser connects to a server, an HTTP User Agent Header is also sent to the server. This header contains information about the browser (like browser type and version number). The BrowserType object then compares the information in the header with information in a file on the server called "Browscap.ini".

If there is a match between the browser type and version number sent in the header and the information in the "Browsercap.ini" file, you can use the BrowserType object to list the properties of the matching browser. If there is no match for the browser type and version number in the Browscap.ini file, it will set every property to "UNKNOWN".

The "Browsercap.ini" file is used to declare properties and to set default values for browsers.

Syntax:
Set MyBrow=Server.CreateObject("MSWC.BrowserType")

No comments: