dcsimg

Explaining Objects in ASP Page 2

By ServerWatch Staff (Send Email)
Posted Dec 28, 1998


Explaining Objects in ASP


<%session("Name")=Request("Name")%> <%session("EMail")=Request("EMail")%> <%Application.Lock Application("NumValues")=Application("NumValues")+1 Application.Unlock%> Welcome Mr./Ms. <%=Request.Form("Name")%>. Will send you a mail shortly to <%=Request("EMail")%>.

Thanks for visiting this site. Hope you have found the Objects <%=Request("test")%>

Your machines IP Address is <%=Request("REMOTE_ADDR")%>

The text in red are retrieved using the various collections of Request Object.

Source of the Form


<form name="form1" action="http://www.serverwatch.com/tutorials/article.php/10825_1491571_2?test=working" method="post">

Name : <input type="text" name="Name">
EMail : <input type="text" name="EMail">

<input type="submit" name="Button1" value="Submit">  <input type="reset" name="Button1" value="Clear">
</form>


In the above source , note the action url in the form which has a variable "test" attached to it.

Source of the ASP file


Welcome Mr./Ms. <b><font color=red><%=Request.Form("Name")%>
</font></b>.
Will send you a mail shortly to <b><font color=red><%=Request("EMail")%>
</font></b>.
Thanks for visiting this site. Hope you have found the Objects
<b><font color=red><%=Request("test")%></font></b>


Your machines IP Address is <b><font color=red>
<%=Request("REMOTE_ADDR")%></font></b>


Here, note that we have used both Request.Collection("Variables") and Request("Variables") syntax. Also note the usage of the REMOTE_ADDR variable in the request object to retrieve the Remote IP address using Request.ServerVariable collection.


Go back to article


Page 2 of 2


Comment and Contribute

Your name/nickname

Your email

(Maximum characters: 1200). You have characters left.


 

 


Thanks for your registration, follow us on our social networks to keep up-to-date