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 a script in an ASP page.
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 Services interface. If you use MyInfo on IIS, these properties will not be implemented.
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 2000, and to the root directory on Windows95 or later.
MyInfo.dll | The MyInfo component. |
MyInfo.xml | The file that stores the values of the MyInfo properties. |
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>
Only create one MyInfo object on 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.
MyInfo.property
Properties Set by Personal Web Services:
MyInfo.PageType | Returns a number corresponding to the value in the "This site is ..." pop-up menu in the Personal Web Services 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 "". |