![]() |
Web Development »
ASP »
General
Beginner
Working with cookiesBy Iulian IugaAn introduction to using cookies in your ASP scripts |
VBScript, ASP, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||
This is a small ASP (Microsoft Active Server Pages) application that implements basically work with cookies.
The project has next main-functionality:
The project has three important parts:
For that I use the Browser Capabilities component (“MSWC.BrowserType”)
set objBrowserCapabilities = server.CreateObject("MSWC.BrowserType") ' ... blnSupportCookies = objBrowserCapabilities.cookies ' ...
For that I use the Request.Cookies collection. (See the ASP built-in objects.)
For that I use the Response.Cookies collection. (See the ASP built-in objects.)
The cookies have two forms:(See http://www.microsoft.com/info/cookies.htm)
If you want write a normal cookie then specify a value in the Cookie Name field (this field is required) and a value in the Cookie Value field. If you want to write a dictionary cookie first you must type the number of keys (must be great 0) and then click 'Write cookie dictionary'. The page is then setup with your options and you can type values for your cookie dictionary. After you put the values in fields click 'Submit'. The cookie is written to the browser and is automatically read and displayed on the page.
If you don’t set an expire value then your cookie lifetime will end after you shut down the current session. To extend yours cookies lifetime, you must set the Date and Hour values.
Please feel free to ask any questions you have by e-mail: iulian_iuga@yahoo.com
That's it!
| You must Sign In to use this message board. | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||