O'Reilly logo

Application Development Using Visual Basic® and .NET by Dana L. Wyatt, Peter Thorsteinson, Robert J. Oberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

State in ASP.NET Applications

Preserving state across HTTP requests is a major problem in Web programming, and ASP.NET provides several facilities that are convenient to use. There are two main types of state to be preserved.

  • Application state is global information that is shared across all users of a Web application.

  • Session state is used to store data for a particular user across multiple requests to a Web application.

Shared Data Members

Shared data members of a class are shared across all instances of a class. Hence shared data members can be used to hold application state.

In our case study the class Global has a single shared member acmedat of the class Acme.

Thus the broker and custs objects within Acme will hold shared data that is the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required