protected void btnSavePersonDetails_Click(object sender, EventArgs e)
        {
            PersonSession person = new PersonSession(int.Parse(tbPersonId.Text),
                                                     tbName.Text, int.Parse(tbAge.Text), chkEmailValidated.Checked);

            PersonSession.CreatePersonSession(person);
        }
 protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     // check the person details existance here
     PersonSession person = PersonSession.GetPersonSession();
     if (person == null)
     {
         this.lblIsLogged.Text = "Not logged!";
     }
     else
         this.Person = person;
 }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            // check the person details existance here
            PersonSession person = PersonSession.GetPersonSession();

            if (person == null)
            {
                this.lblIsLogged.Text = "Not logged!";
            }
            else
            {
                this.Person = person;
            }
        }
 protected void btnSavePersonDetails_Click(object sender, EventArgs e)
 {
     PersonSession person = new PersonSession(int.Parse(tbPersonId.Text),
     tbName.Text, int.Parse(tbAge.Text), chkEmailValidated.Checked);
     PersonSession.CreatePersonSession(person);
 }
 public static void CreatePersonSession(PersonSession person)
 {
     HttpContext.Current.Session[KEY] = person;
 }
Esempio n. 6
0
 public static void CreatePersonSession(PersonSession person)
 {
     HttpContext.Current.Session[KEY] = person;
 }