Para emitir a sa�da ao usu�rio do usu�rio, o objeto da resposta do ASP � usado.
Objeto da resposta
Para emitir a sa�da ao usu�rio do usu�rio, o objeto da resposta do ASP � usado. Seus cole��es, propriedades, e m�todos s�o descritos abaixo:
Cole��es:
Collection
Description
Cookies
Sets a cookie value. If the cookie does not exist, it will be created, and take the value that is specified
Propriedades
Property
Description
Buffer
Specifies whether to buffer the page output or not
CacheControl
Sets whether a proxy server can cache the output generated by ASP or not
Charset
Appends the name of a character-set to the content-type header in the Response object
ContentType
Sets the HTTP content type for the Response object
Expires
Sets how long (in minutes) 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
Indicates if the client has disconnected from the server
Pics
Appends a value to the PICS label response header
Status
Specifies the value of the status line returned by the server
M�todos
Method
Description
AddHeader
Adds a new HTTP header and a value to the HTTP response
AppendToLog
Adds a string to the end of the server log entry
BinaryWrite
Writes data directly to the output without any character conversion
Clear
Clears any buffered HTML output
End
Stops processing a script, and returns the current result
Flush
Sends buffered HTML output immediately
Redirect
Redirects the user to a different URL
Write
Writes a specified string to the output
Escrever o texto com ASP
<html>
<body>
<%
response.write("Hello World!")
%>
</body>
</html>
O/P:
Hello World!
Texto do formato com os Tag do HTML no ASP
<html>
<body>
<%
response.write("<h2>You can use HTML tags to format the text!</h2>")
%>
<%
response.write("<p style='color:#0000ff'>This text is styled with the style
attribute!</p>")
%>
</body>
</html>
O/P:
You can use HTML tags to format the text!
This text is styled with the style attribute!
Dirigir de novo o usu�rio a um URL diferente
<%
if Request.Form("select")<>"" then
Response.Redirect(Request.Form("select"))
end if
%>
<html>
<body>
<form action="demo_redirect.asp" method="post">
<input type="radio" name="select"
value="demo_server.asp">
Server Example<br>
<input type="radio" name="select"
value="demo_text.asp">
Text Example<br><br>
<input type="submit" value="Go!">
</form>
</body>
</html>
O/P:
Server
Example
Text Example
Demonstra o uso do m�todo da escrita. Para escrever ao browser.
<%@ Language=VBScript%>
<% strFileTitle = "Writing"%>
<%ifnotLCase(Request.QueryString("PageView")) = "source" then%>
<%ShowHeader strFileTitle%>
<%<
Response.Write "<HTML>"
Response.Write "<HEAD>"
Response.Write "<META NAME=""GENERATOR"" Content=""Microsoft Visual Studio 6.0"">"
Response.Write "</HEAD>"
Response.Write "<BODY>"
Response.Write "This example is done completely using Response.Write statement.<BR><BR>"
Response.Write "If you need to produce quotation marks you use """
Response.Write "</BODY>"
Response.Write "</HTML>"
ShowFooter
%>
O/P:
This example is done completely using Response.Write statement.
If you need to produce quotation marks you use ""
Keywords:
cdonts component, cdonts dim, active server pages, cdonts recipients