Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Cookie in Class?


Message #1 by philip.hatt@a... on Fri, 24 May 2002 09:59:30
Thanx!

It worked very well.

Philip

> Request is indeed not directly available. However, you can retrieve a 
c> urrent HTTPContext and ask for its Request object.

> Here is an example:

> Imports System.Web.HttpRequest
I> mports System.Web.HttpUtility

> Dim _context As HttpContext = HttpContext.Current
s> MyCookieValue = UrlDecode(_context.Request.Cookies
(> "MyCookieName").Value.ToString())

> In the example above, sMyCookieValue will contain the value of the 
cookie 
M> yCookieName.

> HtH

> Imar

> 

> > Hello!

> > I'm developing an multilingual application and would like to get the 
f> > unctionlaity of the languages in an own class. 

> > In sub new of the class i would like to check a cookie but there seems 
t> o 
b> > e problems with that. 

> > I get the error "request no available in ..."

> > How can I resolve this problem?

> > Philip.

  Return to Index