The Response Object is used to send output to the user from the server.
Collection
- Cookies(name) - Sets a cookie value. If the cookie does not exist, it will be created, and take the value that is specified
Properties
- Buffer - Whether to buffer the output or not. When the output is buffered, the server will hold back the response until all of the server scripts have been processed, or until the script calls the Flush or End method. If this property is set, it should be before the <html> tag in the ASP file
- CacheControl - Sets whether proxy servers can cache the output or not. When set to Public, the output can be cached by a proxy server
- Charset(charset_name) - Sets the name of the character set (like "ISO8859-1") to the content type header
- ContentType - Sets the HTTP content type (like "text/html", "image/gif", "image/jpeg", "text/plain"). Default is "text/html"
- Expires - Sets how long a page will be cached on a browser before it expires
- ExpiresAbsolute - Sets a date and time when a page cached on a browser will expire
- IsClientConnected - Checks if the client is still connected to the server
- Pics(pics_label) - Adds a value to the pics label response header
- Status - Specifies the value of the status line
Methods
- AddHeader(name, value) - Adds an HTML header with a specified value
- AppendToLog string - Adds a string to the end of the server log entry
- BinaryWrite(data_to_write) - Writes the given information without any character-set conversion
- Clear - Clears the buffered output. Use this method to handle errors. If Response.Buffer is not set to true, this method will cause a run-time error
- End - Stops processing the script, and return the current result
- Flush - Sends buffered output immediately. If Response.Buffer is not set to true, this method will cause a run-time error
- Redirect(url) - Redirects the user to another url
- Write(data_to_write) - Writes a text to the user
Practice Excercise Practice now