protected void Button2_Click(object sender, EventArgs e) { BDHandler DB = new BDHandler(); string s = DB.SaveMembers(list); Session.Remove("P"); Response.Redirect("Page3.aspx?s=" + s); }
protected void Button1_Click(object sender, EventArgs e) { BDHandler DB = new BDHandler(); Population P = new Population(); P.ApplicationId1 = DB.getAppId(); P.MemberId1 = list.Count + 1; P.Firstname1 = TextBox1.Text; P.Middlename1 = TextBox2.Text; P.Lastname1 = TextBox3.Text; P.Suffix1 = DropDownList1.SelectedValue; P.Dob1 = DateTime.Parse(TextBox4.Text); string ch = RadioButton1.Checked ? "Male" : "Female"; P.Gender1 = ch; list.Add(P); Session["P"] = list; GridView1.DataSource = list; GridView1.DataBind(); }