protected void ButtonEdit_Click(object sender, EventArgs e) { ServiceReference1.MdlLandlord landlord = new ServiceReference1.MdlLandlord(); landlord.Email = Session["Email"].ToString().Trim(); landlord.Name = TextBoxName.Text; landlord.Contact_person = TextBoxContactAndSurname.Text; landlord.Address = TextBoxAddress.Text; landlord.PostCode = TextBoxPostCode.Text; landlord.City = TextBoxCity.Text; landlord.Country = TextBoxCountry.Text; landlord.Phone = TextBoxPhone.Text; client.EditLandlordProfile(landlord); Session["Name"] = TextBoxName.Text; Session["ContactPerson"] = TextBoxContactAndSurname.Text; Session["Address"] = TextBoxAddress.Text; Session["PostCode"] = TextBoxPostCode.Text; Session["City"] = TextBoxCity.Text; Session["Country"] = TextBoxCountry.Text; Session["Phone"] = TextBoxPhone.Text; if (client.EditLandlordProfile(landlord) == true) { LabelEditProfile.Text = "Profile was updated successfully"; } else { LabelEditProfile.Text = "Profile update failed"; } }