Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check if a cookie exists

Status
Not open for further replies.

erics55

Programmer
Nov 20, 2006
30
0
0
SE
Hi
How do I check if a cookie already exists, because if it does i dont want to craete another
Thanks
 
How about something like:
Code:
        ' Get cookie from current request.
        Dim cookie As HttpCookie
        cookie = Request.Cookies.Get("MyCookie")
        
        ' Check if cookie exists in the current request
        If (cookie Is Nothing) Then
        ...


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top