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

Accessing Application state from Class Library 1

Status
Not open for further replies.

hjmc

Technical User
Nov 20, 2002
38
GB
I am creating a class library (in ASP VB.NET) and need to access application and session state variables.

I cant quite grasp how to use use HttpApplicationState etc

Can some kind person give me a short piece of code to show me how to do this. Thanks
 
am creating a class library (in ASP VB.NET)
your creating a class library using VB and happen to reference the System.Web namespace. Asp.Net is just a framework to handle web requests, nothing more. webforms is a rendering engine to generate html for the asp.net requests.

it's a subtle but important difference. Alot of new developers confuse asp.net for a programming language rather than a framework. This may also help you understand other frameworks like MS MVC, MonoRail, Web Client Software Factory, etc.

you also do not need to create a website to create an assembly which references Session. Simply reference the System.Web assembly in your project. But to test this you will need an HttpContext which requires a web request.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top