Allows the script to set the content type for
the output.Syntax:
Response.ContentType = string
Parameters:
string - string containing the new MIME content type
By default ScriptGen assumes that the output is text/html. If you are generating
something else you must set the appropriate value in order to inform the browser (or other
application using ALP through the URLMonikers) what to do with the output.
Examples:
JScript/VBScript:
<% Response.ContentType = "text/plain" %>
If the output is plain text.
When using BinaryWrite method content type is usually something else - for example some
image format:
<% Response.ContentType = "image/gif" %>
<% Response.ContentType = "image/jpeg" %>
Remarks:
Note that ALP buffers the output always. Thus in ASP compatible pages
the content
type can be set at any point of the script and of course can be changed at some next
point. For compatibility with the classic ASP setting the content type should be done before
any other output. In other case the ASP pages may fail when running on a WEB server.
Applies to: Response object
See also: Response.BinaryWrite |