OK back in the normal asp days setting and reading a cookie was so dam simple

response.cookies("blah") = blah &
request.cookies("blah")

ok now the .net way (*** is that all about)

ok heres my real question

i have a control which handles the left hand side of my website on here ive got a littie area which displays users shopping cart so therefore i store the users cart id in the cookie,

when ever i load the index page is get this error

VB Code:
  1. If Request.Cookies("CartCookie").Value >= 0 Then
Object reference not set to an instance of an object.
its because i havnt defined the NEW part of the cookie...
So if i do instead


VB Code:
  1. Dim cookie As HttpCookie = New HttpCookie("CartCookie")
  2. if cookie.value > 0 then

It allows me to run the page without errors, however every time i add to the cart its panel in this control is never displayed....

Now am i just being thick or what