protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["DELETE"] != null) { string conID = Request.QueryString["delete"]; Connection.DeleteAdress(conID); Response.Redirect($"./mainViewContactAdress.aspx?id={Request.QueryString["id"]}"); } if (!IsPostBack) { adress_lit.Text = Connection.ShowAdresses(Request.QueryString["id"]); } if (type_test.Text.Length != 0 && type_test.Text != null) { Connection.EditAdress(hiddenID.Text, type_test.Text, street_test.Text, city_test.Text); adress_lit.Text = Connection.ShowAdresses(Request.QueryString["id"]); } if (type.Text.Length != 0 && type.Text != null) { string ID = Request["id"]; Connection.AddAdress(ID, type.Text, street.Text, city.Text); Response.Redirect($"./mainViewContactAdress.aspx?id={ID}"); } //if (Request.QueryString["EDIT"] != null) //{ // Connection.EditUser(hiddenID.Text, type_test.Text, street_test.Text, city_test.Text); //} }