Click to See Complete Forum and Search --> : Question from a newbie: Testing for a cookie


seawolf
10-05-2006, 08:47 PM
I know very little about ASP and ASPX pagfes but i inherited a web site done by a guy who knew just a little more than me and I've worked around things with my knowledge of HTML and Javascript, as well as added on to the web site using Cold Fusion. But I am at a point that I need to be able to do more.

I have a ASPX page with a Log In button that I don't want see if a certain cookie exists. Is there a way to test for that cookie on the page and display or not display something based on that test?

Any help would be appreciated.

Ron

jvanamali
10-06-2006, 01:03 PM
For tutorial on cookies in dotnet
http://samples.gotdotnet.com/quickstart/aspplus/doc/stateoverview.aspx#cookies
http://www.startvbdotnet.com/aspsite/forms/cookies.aspx

for tutorial on cookies with asp , you can use
http://w3schools.com/asp/asp_cookies.asp


to check whether a cookie exits or not you can use
if request.cookies("aaaa") is Nothing then
do something
else
do some other thing
Endif