private void Button_Click(object sender, RoutedEventArgs e) { try { help = Text; //help contans what is curently in textbox/Text nanny = (((BE.Nanny) this.nannyIdComboBox.SelectedItem)); bl.ChangeInfoNanny(nanny, help); //adds Recommendation to nanny this.TextboxR.ClearValue(TextBox.TextProperty); //clears text box } catch (FormatException) { MessageBox.Show("check your input and try again"); } catch (Exception ex2) { MessageBox.Show(ex2.Message); } }