you are most likely trying to access the variable outside of the page
context. You should use the Httpcontext.current qualification instead of the
page class qualification.
--
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @
www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------
"Amy" <am*******@mccombs.utexas.edu> wrote in message
news:gd********************************@4ax.com...
Hello,
I'm having an odd issue with accessing a Session variable on a web
form.
If i access it from the PageLoad event, it works fine. If I take it
out of the PageLoad event, I get the error -
"an object reference is required for the nonstatic field, method, or
property "System.Web.UI.Page.Session'"
Can anyone explain why this is happening?
thanks in advance,
Amy