Sideway BICK BlogSideway BICK BLOG from Sideway

A Sideway to Sideway Home

Link:http://output.to/sideway/default.asp?qno=130200010

ASP Server Component, Pre-made Function, MyInfo Component

ASP Server Components

Some of the ASP server components are the common features found in dynamic web pages. These base ASP server components are provided to enrich the pre-made functions of ASP technology for making dynamic and interactive web pages. However, some IIS pre-made components are not installed for all version of IIS. Ad Rotator, Browser Capabilities, Content Linker, Content Rotator, Counters, Logging Utility, My Info, Page Counter, Status, and tools are not installed with IIS 6.0. However, if you upgrade your Web server from a previous version of IIS, the pre-made components are not removed. Some IIS pre-made components, ASP content rotator and nextlink,  are deprecated in IIS7. And most IIS pre-made components are either not installed with IIS7 or their usage is not supported.

MyInfo Component

The MyInfo Component can be used to create a MyInfo object that acts as a HTML tags holder on an ASP page for keep track of personal information, such as name of site administrator, address, and display choices. These information are defined as the properties of a MyInfo object so that the values of these properties can be set or retrieved diirectly through a MyInfo object on an ASP page. If no value is set to a pre-defined property, the property will return an empty string. Besides, new properties of MyInfo object can be created by simply assigning a string value to the new property. These new properties are stored together with other MyInfo properties permanently in the MyInfo.xml file. Any changes in the property of the MyInfo objects may need to restart the IIS services in ordered to make the changes written to the MyInfo.xml File.

MyInfo object can have various properties. In the personal web server, some properties of  personal information are implemented by the personal web service interface, how these properties of MyInfo object are not implemented on the IIS. The MyInfo.xml File may be s%WINDIR%\inetsrv\Data or %WINDIR%\inetsrv\ directory depending on the verson of IIS and the operating system.

File Name

The file name of the Content Rotator component is MyInfo.dll.

Syntax

Set MyInfoName = Server.CreateObject( "MSWC.MyInfo" )

Since only one MyInfo object can be created on a web site, using of the Server.CreateObject( MSWC.MyInfo) may cause the problem of creating more than one MyInfo object for the site. A better way to declare the MyInfo object is the using of a <object> tag in the Global.asa file.

<object
runat="Server"
id="MyInfoName"
progid="MSWC.MyInfo"
scope="Session">
</object>

Parameters

MyInfoName

The parameter "MyInfoName" is the name assigned to the instance of the MyInfo object created by the call using the Server.CreateObject or a <object> tag.

Remarkrk

The MyInfo component does not work with Internet Information Server 7 (IIS7).

MyInfo Properties

The properties of a MyInfo object is used as the item fields of the MyInfo object to set and retrieve the information stored in the Myinfo.xml file. Any changes in the property of the MyInfo objects may need to restart the IIS services in ordered to make the changes written to the MyInfo.xml File.

Syntax

MyInfoName. PropertyName

var=MyInfoName. PropertyName

MyInfoName. PropertyName=str

Parameters

MyInfoName

The parameter "MyInfoName" is the name of the instance of the MyInfo object to be set.

PropertyName

The parameter "PropertyName" is the name of the property of the MyInfo object instance to be set.

var

The parameter "var" is the variable name assigned to.

str

The parameter "str" is the string enclosed in quotation marks (" ") to be assigned to.

Return Values

Return values only available when the property is set to the pre-defined property of the  Web server. If no value is set to a pre-defined property, the property will return an empty string.

MyInfo Properties Examples

In the personal Web server for Windows 95, the <OBJECT> declaration is already included in the Global.asa file in the default virtual directory to create the MyInfo object for the default web site. Some personal properties is already set by the Web Service.

Value Description
MyInfo.PageType to return a numeric value describing the content of the information that can be set on the home page of the wizard PWS 4.0.
  1 = About My Company
  2 = About My Life
  3 = About My School
  4 = About My Organization
  5 = About My Community
MyInfo.PersonalName to return the name of the owner.
MyInfo.PersonalAddress to return the address of the owner.
MyInfo.PersonalPhone to return the phone number of the owner.
MyInfo.PersonalMail to return an e-mail address of the owner.
MyInfo.PersonalWords to return the text of the remarks about the owner.
MyInfo.CompanyName to return the company name of the owner.
MyInfo.CompanyAddress to return the business address of the owner.
MyInfo.CompanyPhone to return the companyk phone number of the owner.
MyInfo.CompanyDepartment to return the department name of the owner.
MyInfo.CompanyWords to return the other text on the place of employment of the owner.
MyInfo.HomeOccupation to return the occupation of the owner.
MyInfo.HomePeople to return the text to introduce the family of the owner.
MyInfo.HomeWords to return the text of the other about the owner.
MyInfo.SchoolName to return the name of the school owner.
MyInfo.SchoolAddress to return the address of the school of the owner.
MyInfo.SchoolPhone to return the phone number of the school of the owner.
MyInfo.SchoolDepartment to return the class of the owner or department.
MyInfo.SchoolWords to return the text of the other owners about the school.
MyInfo.OrganizationName to return the name of the organization that has been introduced in the site.
MyInfo.OrganizationAddress to return the address of the organization.
MyInfo.OrganizationPhone to return the phone number of the organization.
MyInfo.OrganizationWords to return the other text about your organization.
MyInfo.CommunityName to return the name of the municipality that has been introduced in the site.
MyInfo.CommunityLocation to return to the location of the municipality.
MyInfo.CommunityPopulation to return the population of the municipality.
MyInfo.CommunityWords to return the other text on the municipality.
MyInfo.URL (n) to return the n-th user-defined URLcorresponding to the description of the n-th link in MyInfo.URLWords.
MyInfo.URLWords (n) to return a string that describes the n-th user-defined link corresponding to the n-th URL in MyInfo.URL.
MyInfo.Style to return (URL that starts with '/') URL relative to the style sheet.
MyInfo.Background to return the background of the site.
MyInfo.Title to return the user-defined title of the home page.
MyInfo.Guestbook If the guest book is available on the site and to return -1. Otherwise, to return 0. The default value is "".
MyInfo.Messages If the private message form is available on the site to return -1. Otherwise, to return 0. The default value is "".
Previous Month  FEB  2013  Next Month
SMTWTFS
12
3456789
10111213141516
17181920212223
2425262728

Previous Month  OCT  2017  Next Month
SMTWTFS
1234567
891011121314
15161718192021
22232425262728
293031

Sideway BICK Blog

21/02


Copyright © 2000-2020 Sideway . All rights reserved Disclaimerslast modified on 26 January 2013