Explaining Objects in ASP Page 2

Download the authoritative guide: Data Center Guide: Optimizing Your Data Center Strategy

Download the authoritative guide: Cloud Computing: Using the Cloud for Competitive Advantage

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">

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")%>
Will send you a mail shortly to <b><font color=red><%=Request("EMail")%>
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>

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

This article was originally published on Dec 28, 1998
Page 2 of 2

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