Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 31st, 2004, 09:58 AM
Registered User
 
Join Date: Aug 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cookie Exist

Is there not a simple way to check if a cookie exists?

I get to may page it checks a value against something in the cookie. The trouble is first time users don't have this cookie and it all goes horribly wrong. So i need to check if it exists, if not then create it

Thanks to anyone that can help.
 
Old August 31st, 2004, 10:22 AM
Registered User
 
Join Date: Aug 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Found it why do i ALWAYS find the answer myself only once i have posted on a forum...
Heres what i used if anyone need it?

If Request.Cookies("cookiename") Is Nothing Then
   Code if cookie does not exist
Else
   Code if cookie exists
End If
 
Old September 3rd, 2004, 03:09 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

That shows you are good enough to find that yourself in less than 30 mins;).

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Cookie prv299 ASP.NET 2.0 Professional 3 May 29th, 2008 11:26 AM
Cookie problem ps0208 Servlets 1 November 5th, 2007 05:55 AM
Can't delete cookie...! Snib Beginning PHP 9 July 15th, 2007 10:32 PM
cookie turn off swagatika ASP.NET 1.0 and 1.1 Basics 2 March 15th, 2006 09:25 AM
Cookie Trouble.. smeggy31 Classic ASP Professional 1 June 22nd, 2004 03:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.