| ASP Cookies | ASP Cookies Scripts by ASP Web Pro |
|
ASP ScriptsREAD ASP COOKIES BASICSOK, you have a script that writes an asp cookie and now you need to read the cookie each time the user returns to your website. It's really quite simple. First, we declare a few variables and then we use Request.Cookies to read the cookie from the browser and get our values. For this example, let's say that you have a secure website that uses a username and password combination. When a user becomes a member of your site, you simply write an asp cookie to their browser that stores their username and password and any other data you want. By doing this, you can read the username and password data from the cookie each time the user returns to your site and use another ASP script to validate the cookie data with your database data. As long as the cookie data matches your database data, the user will be able to use your secure web site without any interuption. Here is how the script looks:
Just replace MyCOOKIE with your own cookie name and you are on your way.
Now you can read asp cookies. If you missed how to write asp cookies, be sure to check out Write ASP Cookies Basics.
|
|||||
|
Main Menu Other Resources
Last Updated:
|
|||||
|
© 1997-2008 ASP Web Pro, Inc. | Terms of Use
|