View Single Post
  #4 (permalink)  
Old March 22nd, 2006, 02:59 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Rit,

In ASP you can check if a cookie has a value by comparing against "". So, this should work:
Code:
If Request.Cookies("Cookie1")  & "" = "" Then
  Response.Write("Nothing<br />")
Else
  Response.Write("NOT Nothing<br />")
End If
Once you know you have a valid cookie, you can use its HasKeys property to see if it has any, eeuuh, keys. ;)

See here for more information: http://www.w3schools.com/asp/asp_cookies.asp

Hth,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Vamos by Pixies (Track 12 from the album: Surfer Rosa & Come On Pilgrim) What's This?
Reply With Quote