Link:http://output.to/sideway/default.asp?qno=130200010 ASP Server Component, Pre-made Function, MyInfo Component ASP Server ComponentsSome 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 ComponentThe 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 NameThe file name of the Content Rotator component is MyInfo.dll. SyntaxSet 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
ParametersMyInfoName 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. RemarkrkThe MyInfo component does not work with Internet Information Server 7 (IIS7). MyInfo PropertiesThe 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. SyntaxMyInfoName. PropertyName var=MyInfoName. PropertyName MyInfoName. PropertyName=str ParametersMyInfoName 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 ValuesReturn 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 ExamplesIn 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.
|
Sideway BICK Blog 21/02 |