The Response Object

The Write Method

The Write method adds text to the HTTP response message.

Syntax

Use the following syntax for the Write method:
 Response.  Write   variant  

The variant can be any data type (including characters , strings, and integers) that is supported by your default scripting language.

The variant cannot contain the character combination %> , which is used to denote the end of a script statement. Instead, you can use the escape sequence %\> , which the Web server will translate when it processes the script.


Note

If VBScript is your default scripting language, the variant cannot be longer than 1,022 characters.


Example This example uses the Write method within a loop to display the values of each standard HTML control on a form that is sent in an HTTP request:
 <%For Each Item In Request.Form Response.Write Item Next %> 
Example This example adds an HTML tag to a Web page. The string returned by the Write method cannot contain the characters %> in an HTML tag, so the escape sequence %\> is used instead:
 <% Response.Write "<TABLE WIDTH = 100%\>" %> 


Microsoft Windows Architecture Training
Microsoft Windows Architecture for Developers Training Kit
ISBN: B00007FY9D
EAN: N/A
Year: 1998
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net