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

Session variable with Class

Status
Not open for further replies.

croydon

Programmer
Apr 30, 2002
253
EU
I am changing an application that includes a public class.

I am adding a session variable that will pass between forms and hold any error messages encountered. This works fine except when it accesses the class. Then the session contents are lost.

I added a watch and when it enters the class I get the message 'Name session is not decared'.

I tried adding 'Inherits System.Web.UI.Page' but I get the error 'Cannot refer to an instance member of a class from within a shared method......'.

Any suggestions would be appreciated.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top