Link:http://output.to/sideway/default.asp?qno=130300002 ASP Server Component, Pre-made Function, Status 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. Status ComponentThe Status component can be used to create a Status object that acts as a HTML tags holder that containg the server status information on an ASP page. However for all Windows platforms, the properties of the Status object currently all return the string "unavailable". The only need for the Status object is when runnig the ASP scripts that were developed on Macintosh and properties of the the Server status are used. File NameThe file name of the Status component is Status.dll. SyntaxSet StatusName = Server.CreateObject("MSWC.Status") ParametersStatusName The parameter "StatusName" is the name assigned to the instance of the Status object created by the call using the Server.CreateObject. RemarkThe Status component does not work with Internet Information Server 7 (IIS7). Status PropertiesThe properties of a Status object is used as the item fields of the Status object to retrieve the information from the server. SyntaxStatusName. PropertyName var=StatusName. PropertyName ParametersStatusName The parameter "StatusName" is the name of the instance of the Status object to be return. PropertyName The parameter "PropertyName" is the name of the property of the Status object instance to be return. var The parameter "var" is the variable name assigned to. Return ValuesFor all Windows platforms, the properties of the Status object currently all return the string "unavailable". The Status properties are implemented on Macintosh Only. Status Properties ExamplesIThe Status properties implemented on Macintosh are
Link:http://output.to/sideway/default.asp?qno=130300003 ASP Server Component, Pre-made Function, Tools 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. Tools ComponentThe Tools component can be used to create a Tools object that acts as a HTML tags holder on an ASP page that providing some utilities for adding sophisticated functionality to the web page. File NameThe file name of the Tools component is Tools.dll. SyntaxSet ToolsName = Server.CreateObject("MSWC.Tools") ParametersToolsName The parameter "ToolsName" is the name assigned to the instance of the Tools object created by the call using the Server.CreateObject. RemarkIn Personal Web Server for Windows 95 or windows 98, the Tools object has already been included in the Global.asa file in the default virtual directory. The Tools component does not work with Internet Information Server 7 (IIS7). Tools.FileExists MethodTools.FileExists method is used to check the existence of a specified file published on the site by specifying the relative URL rather than an absolute URL. If the specified URL exists whith the published directory, the Tools.FileExists method returns -1. And if the specified file does not exist, the Tools.FileExists method returns 0. SyntaxToolsName.FileExists(URL) ParametersToolsName The parameter "ToolsName" is the name of the instance of the Tools object to be set. URL The optional parameter "URL" is used to specify the relative URL of the file to be checked Tools.Owner MethodTools.Owner method is used to check whether the current user is the site administrator. If the name and password submitted in the request header matches the Administrator name and password, the Tools.Owner method returns -1. And if the submitted name and password does not match, the Tools.Owner method returns 0. Currently, the Tools.Owner method only works properly on Personal Web Server for Macintosh. SyntaxToolsName.Owner ParametersToolsName The parameter "ToolsName" is the name of the instance of the Tools object to be set. Tools.PluginExists MethodTools.PluginExists method is used to check the existence of the specified Macintosh server plug-in exists on the site or not. If the specified Macintosh server plug-in name is currently registered, the Tools.PluginExists method returns -1. And if the specified Macintosh server plug-in name is not registered, the Tools.PluginExists method returns 0. The Tools.PluginExists method is only used on Macintosh. For IIS for Windows 95 or latet, the Tools.PluginExists method always returns 0. SyntaxToolsName.PluginExists(PluginName) ParametersToolsName The parameter "ToolsName" is the name of the instance of the Tools object to be set. PluginName The parameter "PluginName" is used to specify the name of the Macintosh server plug-in to be checked Tools.ProcessForm MethodTools.ProcessForm method is used to merges data from a template file with form data submitted by a user for creating a new file. The data submitted by the user can be manipulated by script in the template file. SyntaxToolsName.ProcessForm(OutputFileURL, TemplateURL,[InsertionPoint]) ParametersToolsName The parameter "ToolsName" is the name of the instance of the Tools object to be set. OutputFileURL The parameter "OutputFileURL" is used to specify the relative URL of the file to which the merged data is written. TemplateURL The parameter "TemplateURL" is used to specify the relative URL of the template file. InsertionPoint The optional parameter "InsertionPoint" is used to indicate where in the template file to start inserting the process data. The optional parameter "InsertionPoint" has not been implemented and value assigned to this parameter will be ignored. RemarksThe template file can contain ASP scripts using the delimiters <% and %>. Scripts in <% and %> delimiters is treated just like other text in the template file and copied into the output file. If the output file is an ASP page, the script will run when the output file is executed. For scripts in the template file to be executed during the call to Tools.ProcessForm method, script should be placed between special delimiters <%% and %%>. Since these scripts are executed before the template data is saved in the output file, the result of these scripts between special delimiters <%% and %%> get saved in the output file. If the specified output file exists, the existing file will be overwritten. If the InsertionPoint parameter does not exist, The Tools.ProcessForm method replaces the entire output file. If the InsertionPoint parameter exists, and does not begin with an asterisk (*), Tools.ProcessForm method finds the InsertionPoint string in the output file and inserts the date immediately after it. If the InsertionPoint string begins with an asterisk (*), Tools.ProcessForm method finds the InsertionPoint string in the output file and inserts the data immediately before. If the InsertionPoint string exists, but is not found in the output file, the data is appended to the end of the file. Tools.Random MethodTools.Random method is used to return an integer between -32768 and 32767 . The Tools.Random method is similar to the Rnd function but returns an integer. Similarly, a positive random integer can be obtained by using the Abs function. And a random integer below a specific value can be obtained by using the Mod function. SyntaxToolsName.Random ParametersToolsName The parameter "ToolsName" is the name of the instance of the Tools object to be set. Examples
|
Sideway BICK Blog 05/03 |