MyInfo Component

The MyInfo component creates a MyInfo object that keeps track of personal information, such as the site administrator's name, address, and display choices. Typically, the administrator types this information directly into the Web server interface. However, you can set the values of the properties directly using an ASP script.

Each property of a MyInfo object returns a string. If a MyInfo property has no value set, the property returns an empty string.

The MyInfo object can have properties in addition to the ones documented here. The properties listed in the table below are implemented by Personal Web Server to keep track of information entered into the Personal Web Server interface.

You can create new MyInfo properties by simply assigning a string value to them. For example:

<% MyInfo.DogName = "Snoopy" 
   MyInfo.DogBreed = "Beagle" %> 
 

creates the new properties DogName and DogBreed. These new properties are stored persistently along with the other MyInfo properties.

Create new MyInfo properties for values that remain consistent throughout a site.

The values of MyInfo properties are stored in a single text file, myinfo.xml. MyInfo.xml is installed to the \winnt\system32 directory on Windows NT® and to the root directory on Windows® 95.

File Names

myinfo.dll The MyInfo component.
myinfo.xml The file that stores the values of the MyInfo properties.

Syntax

Create a MyInfo object once in the global.asa file by adding the following:

<OBJECT 
RUNAT=Server 
SCOPE=Session 
ID=MyInfo 
PROGID="MSWC.MyInfo"> 
</OBJECT>
 

Registry Entries

None.

Remarks

Only create one MyInfo object in your site.

You can create a MyInfo object with Set MyInfoObject = Server.CreateObject('MSWC.MyInfo').

Note  For Personal Web Server for Windows® 95, the <OBJECT> declaration that creates MyInfo has already been included in the global.asa file in the default virtual directory. You can work with MyInfo as if it were a built-in object.

Syntax

MyInfo.property
 

Properties Set by Personal Web Server

MyInfo.PageType Returns a number corresponding to the value in the "This site is ..." pop-up menu in the Personal Web Server control panel. These are the pop-up menu options with their corresponding numerical values:
1 = About My Company
2 = About My Life
3 = About My School
4 = About My Organization
5 = About My Community
MyInfo.PersonalName Returns the owner's name.
MyInfo.PersonalAddress Returns the owner's address.
MyInfo.PersonalPhone Returns the owner's phone number.
MyInfo.PersonalMail Returns the owner's e-mail address.
MyInfo.PersonalWords Returns additional text associated with the owner.
MyInfo.CompanyName Returns the name of the owner's company.
MyInfo.CompanyAddress Returns the address of the owner's company.
MyInfo.CompanyPhone Returns the phone number of the owner's company.
MyInfo.CompanyDepartment Returns the owner's department name.
MyInfo.CompanyWords Returns additional text associated with the owner's company.
MyInfo.HomeOccupation Returns the owner's occupation.
MyInfo.HomePeople Returns text listing the people the owner lives with.
MyInfo.HomeWords Returns additional text associated with the owner.
MyInfo.SchoolName Returns the name of the owner's school.
MyInfo.SchoolAddress Returns the address of the owner's school.
MyInfo.SchoolPhone Returns the phone number of the owner's school.
MyInfo.SchoolDepartment Returns the owner's department or class.
MyInfo.SchoolWords Returns text associated with the owner's school.
MyInfo.OrganizationName Returns the name of the organization featured on the site.
MyInfo.OrganizationAddress Returns the address of the organization.
MyInfo.OrganizationPhone Returns the phone number of the organization.
MyInfo.OrganizationWords Returns text describing the organization.
MyInfo.CommunityName Returns the name of the community featured on the site.
MyInfo.CommunityLocation Returns the location of the community.
MyInfo.CommunityPopulation Returns the population of the community.
MyInfo.CommunityWords Returns text describing the community.
MyInfo.URL(n) Returns the nth user-defined URL. Corresponds to the nth link description in MyInfo.URLWords.
MyInfo.URLWords(n) Returns a string containing the nth user-defined description of a link. Corresponds to the nth URL in MyInfo.URL.
MyInfo.Style Returns the relative URL (starting with '/') of a style sheet.
MyInfo.Background Returns the background for the site.
MyInfo.Title Returns the user-defined title for the home page.
MyInfo.Guestbook Returns –1 if the guest book should be available on the site. Otherwise, returns 0. The default value is "".
MyInfo.Messages Returns –1 if the private message form should be available on the site. Otherwise, returns 0. The default value is "".