Sun
ONE Active Server Pages Product Home Page Developer Site Version
 

ContentsPreviousNextIndex



Examples: ASP Response Object Write Method

The following VBScript, in which"a" is repeated 1023 times in the string literal, will fail:

<% Response.Write "aaaaaaaaaaaa...aaaaaaaaaaaaaaaaaa" 

The following VBScript, in which "a" is repeated 4096 times in the string variable, will succeed:

AVeryLongString = String(4096, "a") 
Response.Write(AVeryLongString) 

Using the Response.Write method to send output to the client:

I just want to say <% Response.Write "Hello World." %> 
Your name is: <% Response.Write Request.Form("name") %> 

The following script demonstrates adding an HTML tag to the Web page output. Because the string returned by the Write method cannot contain the character combination "%>" the escape "%\>" has been used instead:

<% Response.Write "<TABLE WIDTH = 100%\>" %> 

The script outputs:

<TABLE WIDTH = 100%> 


ContentsPreviousNextIndex