private void button4_Click(object sender, EventArgs e) { DialogResult dialogResult = MessageBox.Show("Delete user.All profile and picture will dissapear.", "Caution", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { db.DeleteUser(Int32.Parse(userId)); db.DeleteAllUserImage(Int32.Parse(userId)); FillData(); imageBox7.Image = null; } else if (dialogResult == DialogResult.No) { //do something else } }