Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Platinum Edition Using HTML 4, XML, and Java 1.2
(Publisher: Macmillan Computer Publishing)
Author(s): Eric Ladd
ISBN: 078971759x
Publication Date: 11/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


  PICS—By using the PICS property, you can control the rating values of the PICS-label field. The syntax for using the PICS property is
Response.PICS(PicsLabel)

where PicsLabel is the formatted PICS label.
  ContentType—By using the ContentType property, you can specify the MIME content type the Web server will send to the browser. The syntax for using the ContentType property is
Response.ContentType=[ContentType]

where ContentType is a valid content type. Examples of valid content types are image/GIF, image/JPEG, text/HTML, and so on.
  CharSet—The CharSet property controls the character set of the content type the browser will display. The syntax is
Response.CharSet(CharSetName)

where CharSetName is a valid character set name.

Methods The following methods are supported by the Response object:

  Write—By using the Write method, you can send output to the client. The Write method’s syntax is
Response.Write variant

where variant is a VBScript data type. You can use the following line of code, for example, to send the current date and time to the client’s browser:
<%Response.Write now%>
  BinaryWrite—By using the BinaryWrite method, you can send binary information, such as an image, to the client. The BinaryWrite method’s syntax is
Response.BinaryWrite binarydata
  Redirect—Redirect is used to direct the client to a different URL. You will find the Redirect method useful if your site’s URL has changed, but a visitor to your site has not updated its link to your site. This way, when the visitor connects to your site at the old URL, the Redirect method will automatically redirect the visitor’s browser to the new URL. The Redirect method’s syntax is
Response.Redirect URL

You can use the following line of code, for example, to redirect the client browser to the default.asp Active Server Page on your server:
<%Response.Redirect ““default.asp””%>
  AppendToLog—By using the AppendToLog method, you can record information within the Web server’s log file. As a result, you can use the AppendToLog method and the log file for debugging and tracking purposes. The AppendToLog method’s syntax is
Response.AppendToLog string

where string is the string you will record to the log file.
  AddHeaderAddHeader adds information to the existing HTTP header. The AddHeader method’s syntax is
Response.AddHeader header_name, header_value

where header_name is the name of the header, and header_value is the header’s value.
  Clear—By using the Clear method, you can direct the Web server to clear its buffer. The Clear method’s syntax is
Response.Clear
  Flush—The Flush method directs the Web server to send the buffered output to the client browser. The Flush method’s syntax is
Response.Flush


NOTE:  You can use the Clear and Flush methods only if the buffering is on. If buffering is turned off, no data will be within the server’s buffer. Using either method in such a case will result in an error.
  End—By using the End method, you can control the amount of data within the Web server’s buffer. The End method’s syntax is
Response.End

When the server that processes the script comes across the End command, the server, in turn, will stop the data buffering.

The Request Object

The Request object enables you to retrieve information from the client. The Request object includes five collections:

  ClientCertificate—By referencing the ClientCertificate collection within the Request object, the Web server can collect information about certification fields from the browser. The certification fields include the following:
  Certificate—The Certificate field contains the entire certificate content in ASN.1 format.
  SerialNumber—The SerialNumber field contains the certification serial number.
  ValidFrom—The ValidFrom field specifies when the certificate will come into effect.
  ValidUntil—The ValidUntil field specifies when the certificate will expire.
  Issuer—The Issuer field contains information about the issuer of the certificate.
  Subject—The Subject field contains information about the subject of the certificate.
  Cookies—By using the Cookies collection within the Request object, the Web server can collect information from the cookies on the client machine. The syntax for using the Cookies collection is
Request.Cookies(cookie)[(key)|.attribute]

where cookie is the cookie’s name, key is the index of subkey values, and attribute is the specified cookie’s property.
  Form—The Form collection is extremely useful because it enables you to retrieve information the user enters on a form within the browser. The syntax for using the Form collection is
Request.Form(parameter)[(index)|.Count]

where parameter is the form collection’s name, index is the specific form element, and count is the number of elements on the form.
  QueryString—Sometimes data is passed to the server on a URL. By using the QueryString collection, the Web server can parse the information contained with the URL string. The syntax for using the QueryString collection is
Request.QueryString(variable)[(index)|.Count]

where variable is the variable’s name within the query string, index is the element index, and count represents the total number of elements within the query string.
  ServerVariables—The ServerVariables collection enables you to access values of server environment variables. The syntax for using the ServerVariables collection is
Request.ServerVariables (ServerVariable)

where ServerVariable is the server variable’s name. Table 33.4 lists the server variables.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.