protected void Page_Load(object sender, EventArgs e) { MockUser user = new MockUser(); Session.Add("User", user); Response.Redirect("LoadTestTwo.aspx"); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { MockUser user = new MockUser(); Session.Add("User", user); } }
protected void Button1_Click(object sender, EventArgs e) { MockUser user = (MockUser)Session["User"]; Label1.Text = user.UserID.ToString(); Label2.Text = user.UserName; Label3.Text = user.DateCreated.ToString(); }
protected void Page_Load(object sender, EventArgs e) { MockUser user = (MockUser)Session["User"]; Session.Abandon(); }