spacer
Yehuda Shiran October 16, 2002
Using the Global Request Object
Tips: October 2002

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
HP to Microsoft: Thanks for Nothing
iPhone Remains Left Out as Android Scores Flash
The Year of Living the OpenSocial
ASP.NET inherited the built-in objects from ASP. These objects are global in the sense that you don't need to construct them or pass them around; they are always there. There are five built-in objects:

  • Request: Passes information from the user
  • Response: Passes information to the user
  • Server: Controls the IIS Web server
  • Session: Stores and changes information about the user's current Web server session
  • Application:Stores information about the current application. Persistent during the lifetime of the application

The Request and Response objects include collections as their properties. These are the Request object's collections:

  • ClientCertificate: the certificate field issued by the browser. The field names are specified in the x.509 standard
  • QueryString: a free text field
  • Form: the data in an HTML form
  • Cookies: the value of an application-defined cookie
  • ServerVariables: information about the server, such as the server name

IBuySpy uses the Cookies collection above. When the initial default page (Default.aspx) loads, we check if there is a personalization cookie around, and assemble a personalized Welcome message if there is such a cookie. This is the role of Page_Load():

  function Page_Load(sender: Object , e: EventArgs) : void {
    if (Request.Cookies["IBuySpy_FullName"] != null) {
      WelcomeMsg.Text = "Welcome " + Request.Cookies["IBuySpy_FullName"].Value;
    }
  }

People who read this tip also read these tips:

Look for similar tips by subject:

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Administering RBAC in PHP 5 CMS Framework · xref: Automatic Cross Referencing Script · Book Review: Content Rich
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Gateway Launches New Core i7-powered FX-Series Gaming PCs · Review: Lenovo ThinkPad SL300 · EBay, Alternative Site Holiday Resources for Sellers