Para come�ar a informa��o do usu�rio, o objeto do pedido do ASP � usado.
Objeto do pedido
� chamado um pedido quando um browser pede uma p�gina de um usu�rio. Para come�ar a informa��o do usu�rio, o objeto do pedido do ASP � usado. Seus cole��es, propriedades, e m�todos s�o descritos abaixo:
Cole��es:
Collection
Description
ClientCertificate
Contains all the field values stored in the client certificate
Cookies
Contains all the cookie values sent in a HTTP request
Form
Contains all the form (input) values from a form that uses the post method
QueryString
Contains all the variable values in a HTTP query string
ServerVariables
Contains all the server variable values
Propriedades
Property
Description
TotalBytes
Returns the total number of bytes the client sent in the body of the request
M�todos
Method
Description
BinaryRead
Retrieves the data sent to the server from the client as part of a post request and stores it in a safe array
Emitir a informa��o da pergunta quando um usu�rio estala sobre uma liga��o usando QueryString
<html>
<body>
<form action="demo_simpleform.asp" method="post">
Your name: <input type="text" name="fname" size="20" />
<input type="submit" value="Submit" />
</form>
<%
dim fname
fname=Request.Form("fname")
If fname<>"" Then
Response.Write("Hello " & fname & "!<br />")
Response.Write("How are you today?")
End If
%>
</body>
</html>
O/P:
Your Name:
Results:
Hello Ravi!
How are you today?
Criar um bolinho bem-vindo
<%
dim numvisits
response.cookies("NumVisits").Expires=date+365
numvisits=request.cookies("NumVisits")
if numvisits="" then
response.cookies("NumVisits")=1
response.write("Welcome! This is the first time you are visiting this
Web page.")
else
response.cookies("NumVisits")=numvisits+1
response.write("You have visited this ")
response.write("Web page " & numvisits)
if numvisits=1 then
response.write " time before!"
else
response.write " times before!"
end if
end if
%>
<html>
<body>
</body>
</html>
O/P:
Welcome!
This is the first time you are visiting this Web page.
Formul�rio do in�cio de uma sess�o usando a cole��o do formul�rio