protected void Button1_Click(object sender, EventArgs e) { var id = int.Parse(Request.QueryString["no"]); Sec_Users account = i.Sec_Users.Find(id); i.Sec_Users.Remove(account); i.SaveChanges(); Response.Redirect("ActivateAcc.aspx"); }
protected void Button2_Click(object sender, EventArgs e) { var id = int.Parse(Request.QueryString["no"]); Sec_Users account = i.Sec_Users.Find(id); account.UserName = TextBox1.Text; account.UserPass = TextBox2.Text; account.Active = CheckBox1.Checked; account.GroupId = int.Parse(DropDownList1.SelectedValue); i.SaveChanges(); Response.Redirect("ActivateAcc.aspx"); }