public Users(string userID) { InitializeComponent(); ErrorMessage.Visible = false; Connect2DB con = new Connect2DB(); this.userID = userID; if (userID == null) { ErrorMessage.Visible = true; } else { UserAllName.Text = con.getUserAllName(userID); if (UserAllName.Text == null) { ErrorMessage.Visible = true; } else { UserAge.Text = "Age: " + con.getUserAge(userID); } } }