The Application object Application object is an application-level object to share information between all users and can maintain data during the Web application running. Application's Properties: The method is as follows: Application object does not have built-in properties, but we can create its properties yourself. <% Application ("Attribute Name) = Value%> In fact, most Application variables are stored in the Contents collection, when you create a new Application variable, actually adding an item in the Contents collection. The following two scripts are equivalent: <% Application ("Greeting") = "Hello!"%> Or <% Application.contents ("Greeting") = "Hello!" Because the Application Variable is in the collection, if you want To display all, however, we have used multiple times, such as for Each loops. <% For each itemin application.contents response.write ("
") Next%> Application method: Application method only two methods: one is LOCK, the other is Unlock. Where the LOCK method is used to ensure that only one user can operate on the Application. UNLOCK is used to cancel the limit of the LOCK method. Such as: <% Application.lock Application ("Visitor_Num") = Application ("Visitor_num") 1 Application.unlock%> Application's event: 1. Application_onstart () triggered when the event application starts. 2, Application_ONEND () This event application triggered. These two events must be defined in the global.asp file, generally defining the function of the connection data in both events and placed in Global.asp. For example: Sub Application_onstart Application ("TT18_Connectionstring") = "driver = {SQL Server}; server = jeff; UID = SA; PWD =; Database = TEST" End Sub A array can be defined as Application object, but this array can only Save as an object without using Application (0) to remove its value. You can define a temporary array implementation. Such as: <% DIM array () array = application ("array" for i = 0 to ubound (array) response.write array (i) Next I%> To modify this Application object, you can also define a temporary array, The Application object assigns an array and then modifies the elements of this array, and finally assign an array to the Application object.
Such as: <% DIM array () array = application ("array") array (0) = "jeff" array (1) = "zhu" Application.lock Application ("array) = array application.unlock%> ObjectContext object This object is used to control the transaction processing of Active Server Pages. The Office is managed by Microsoft Transaction Server (MTS). Event ObjectContext.ontransactionabort is excited by the abandoned transaction event, which occurs after the script is completed. ObjectContext.ontransactionCommit is excited by successful transaction event, which occurs after the script is completed. Method ObjectContext.Setabort explicitly waives one transaction. ObjectContext.setComplete overwrites any call to the ObjectContext.Setabort method in front. The Request object Request object is used to accept all information from the request from the browser to your server. Collection Request.ClientCertificate (Key [Subfield]) Collection of all customer certificates. For Key, this collection has the following keywords: The subject of the Subject certificate. Contains all information about certificate receipts. Can be used with all subdomain suffixes. Issuer certificate issuer. Contains all information about certification verification. In addition to CN, it can be used with all subdomain suffixations. VadidFrom certificate issued date. Use the VBScript format. Validuntil This certificate is not valid. SerialNumber contains the serial number of the certificate. Certificate contains binary streams of the entire certificate, using the ASN.1 format. For Subfield, Subject, and Issuer keywords can have subordinate suffixes: (such as: Subjectou or Issuerl) C originated. O Company or organization name. OU organizational unit. CN user's routine name. L Local. S state (or provincial). Tone or company title. GN given name. I is initially. When file cervbs.inc (VBScript) or CERJAVAS.INC (JScript) is included in your Active Server Page by using the #include oriented, the following two flags can be used: CecertPresent indicates whether the customer certificate exists, its value is true. Or false. CEUNRECONGNIZEDISSURE indicates whether the issuer of the last certificate in the chain is unknown, its value is True or FALSE. Request.cookies (cookie [(key) .attribute]) Cookie collection. Allow the browser's cookie. Cookie indicates that returns that cookie. KEY is used to return a cookie value with a keyword from the Cookie dictionary. For Attribute, you can use attribute Haskeys to determine if a cookie has a child keyword. The value of Haskeys is TRUE or FALSE. Request.form [(index) .count] Fill in the collection of all data in the HTML form. Parameter is the name of a certain element in the HTML form. When a parameter has more than one value (for example, when using a multiple attribute in
Request.QueryString (varible) [(index) .count] Querys the collection of all values of the string. Varible is the name of a variable in the query string. When a variable has more than one value, INDEX is used. When a parameter has a number of values, count refers to the number of values. Request.SerVarible (Server Environment Variable) Environment variable collection. Allow reading HTTP headers. You can read any header information by using an HTTP_ prefix. For example, http_user_agent accepts a client agent HTTP header (browser type). In addition, you can use any environmental information using the variables shown in the table below. All HTTP headers sent by the all_http client, his results have prefix http_. All HTTP headers sent by the all_raw client, as the result and the client send, the metad database path without prefix HTTP_ Appl_MD_Path applications. Appl_physical_path The physical path corresponding to the application element database path. Auth_password When using basic authentication mode, the password entered in the Password dialog box. Auth_type This is the server for verifying the user's verification method when the user has access protected script. Auth_user's verification username. CERT_COOKIE unique customer certificate ID number. Cert_flag Customer Certificate Sign, if there is a client certificate, bit0 is 0. If the client certificate verification is invalid, Bit1 is set to 1. The entrant field in the Cert_issuer user certificate. The Cert_Keysize Secure Socket Tag layer The number of bits of the keyword, such as 128. The Cert_secretKeysize server verifies the number of bits of the private key. Such as 1024. The sequence number field of the Cert_SerialNumber customer certificate. Cert_server_issuer The issuer field of the server certificate Cert_server_subject server certificate. The subject field of the Cert_Subject client certificate. The Content_length client issues the length of content. Content_type The form of FORM content or HTTP PUT sent by the client. Gateway_Interface server uses the gateway interface. HTTPS returns ON if requests through the Secure Channel (SSL). Returns OFF if requests from non-secure channels. HTTPS_KEYSIZE Secure Sockets The number of bits of the keyword is connected, such as 128. The HTTPS_SecretKeysize server verifies the number of bits of the private key. Such as 1024. HTTPS_SERVER_ISUER The issuer field of the server certificate. HTTPS_SERVER_SUBJECT The subject field of the server certificate. The ID number of the Instance_ID IIS instance. Instance_meta_path responds to the metabological path of the requested IIS instance. Local_addr Returns the server address that accepts the request. Logon_user user logs in to the path information provided by the account path_info client. Path_Translated paths obtained after the virtual to physical mapping. Query_string query string content. Remote_addr issues the IP address of the requesting remote host. Remote_host issues a request for remote host name. Request_method proposes a method of request. For example, Get, Head, POST, etc. Script_name executes the name of the script. The host name, DNS address, or IP address of the Server_Name server. Server_Port accepts the requested server port number. Server_Port_Secure is 1 if the request-received server port is the security port, otherwise 0. The name and version of the protocol used by the Server_Protocol server. Server_software answers the name and version of the server software for the request and run the gateway.
The URL provides the basic part of the URL. Method Request.binaryRead (count) receives unreached content of an HTML form. When this method is called, count indicates how many bytes to receive. After calling this method, count indicates how many bytes do actually receive. The length of the property Request.TotalBytes query, in bytes, the response object response object is used to send data to the client browser, and the user can use the object to send the server's data in HTML's browser to the user's browser, it is Request constitutes a pair of received, transmitted data, which is also the foundation of dynamic. The following describes the properties and methods of it. 1. Buffer attribute This property is used to specify whether the page output is used to use the buffer, the default value is false. When it is True, the result is output to the browser until the entire Active Server Page executes. Such as: <% response.buffer = true%>
Such as: