Pulling value from cookie [RESOLVED]
I'm trying to pull a value from some cookies and put them in two variables, one a string and one an integer. Here's my code:
VB Code:
Dim iUserID as Integer
Dim sUserName as String
iUserID = CInt(Val(Request.Cookies("cookieUserID")))
sUserName = CStr(Val(Request.Cookies("cookieUserName")))
But when It loads I get the error:
Argument 'Expression' cannot be converted to type 'HttpCookie'.
I'm new to using cookies so I'm not sure if this is correct way to store their values or not. I can't figure out why its giving me the error.
Thank you!
Re: Pulling value from cookie
Ahh figured it out myself.
VB Code:
Dim iUserID as Integer
Dim sUserName as String
iUserID = Request.Cookies("cookieUserID").VALUE
sUserName = Request.Cookies("cookieUserName").VALUE
Works like a charm now
Re: Pulling value from cookie [RESOLVED]