Goals:

Steps:

  1. Create a new ASP.NET Web Application project.
  2. Enable tracing on the Default.aspx page by adding Trace="true" parameter for the @Page directive:
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="StateManagement_Tracing._Default" Trace="true"%>
  3. Compile and run the page in a browser (note rich information about internal data of the application, session, and page).
  4. Add controls to the page which allow to add and remove application, session and cookie variables.
  5. Add and remove variables, observe values displayed in the trace area and try to understand the idea of application, session, and cookie variables.

[Source code]