Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :
03/24/2008
Times viewed :
1117
The Request.Cookies Property
Introduction
The Request.Cookies property can be used to retrieve the
values stored in the client’s cookie. Cookies are small files, which stores
information on the clients system. Nowadays cookies are used nearly on every
commercial website. Websites like Hotmail, Yahoo and even TopXML uses cookies.
Some websites like GMail doesn’t even work if you have cookies disabled. These
mentioned websites uses cookies to store the username and password in a cookie,
so that each time you visit the website, you don’t need to login again. This
property takes 2 parameters. The first one “Name” is always used and cannot be
avoided. It is the name of the cookie, which is required to retrieve the value.
The second one is “Key”, which is optional and used to retrieve sub keys. Along
with the cookie name you can use the “HasKeys” attribute to verify if the
cookie contains any keys.
Example
In the following example I am first using the Response
object to set two cookies. After that I use the Request object to retrieve the
values.