Professional Documents
Culture Documents
ASP - NET Day 3 - StateManagement
ASP - NET Day 3 - StateManagement
ASP.NET
1
7
Contd…
Storing information in view state:
Information in the form fields on a Web page is
automatically added to the view state.
The view state can be used to store some additional
information.
For example, you can store a key-value pair, Counter=1,
10
Query String
A Query String:
Provides a simple way to pass information from one
page to another.
Is the part of a URL that appears after the question
12
Application State
ASP.NET provides application state as a means of
storing application-specific information such as
objects and variables.
The information in the application state:
14
Contd…
Removing information from application state:
You can remove an existing object or variable, such as
MyVariable from application state by using the
following code snippet:
Application.Remove(["MyVariable"]);
You can also remove all the application state variables
17
Contd…
Session state is not lost if the user revisits a Web
page by using the same browser window.
However, session state can be lost in the following
ways:
19
Contd…
The following code snippet shows some important
options that can be set for the <sessionState>
element:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>