HttpContext.Current.Application
note however that if your class isn't running within the context of a
webrequest, HttpContext.Current will return null...defensive coding would
be:
dim context as HttpContext = HttpContext.Current
if context is nothing then
throw new ApplicationException("must be called from a web context")
end if
'can safely access context.Application now...
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Stu" <s.****@cergis.com> wrote in message
news:ec**************@TK2MSFTNGP10.phx.gbl...
Hi,
If I try to access an application variable from a class I get the error
'Name Application is not declared'.
Is ther any (fairly simple) way of getting round this or do I have to pass
the values in via properties every time I want to use them?
Thank in advance,
Stu
lang: vb.net