// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Web.UI; using System.Web.UI.WebControls; namespace Test { public partial class Test : Page { protected Label sessionV; protected Label applicationV; public void Page_Load(Object src, EventArgs e) { if(Session["V"] == null) { Session["V"] = 1; } else { Session["V"] = (int)Session["V"] + 1; } if(Application["V"] == null) { Application["V"] = 1; } else { Application["V"] = (int)Application["V"] + 1; } sessionV.Text = Session["V"].ToString(); applicationV.Text = Application["V"].ToString(); } } }