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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP.NET Cookie Error 1

Status
Not open for further replies.

khowell78737

Programmer
Nov 18, 2003
22
US
why would this:

If not Request.Cookies("logged") Is Nothing Then
Dim booLog as boolean
booLog = cBool(Request.Cookies("logged").Value
else
booLog = False
End if

Result in an error stating:

"Request is not available in this context"

I have imported the web and cookie namespaces.

Thanks,
Kevin Howell
 
Does your code reside inside a class?
 
Replace Request everywhere in your code to
System.Web.HttpContext.Current.Request. This should do it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top