protected void Button1_Click(object sender, EventArgs e) { try { string userInput = TextBox1.Text; Palindrome1 test = new Palindrome1(); bool result = test.IsPalindrome(userInput); if (result == true) TextBox2.Text = "Yes"; else TextBox2.Text = "No"; } catch (Exception ex) { TextBox2.Text = "Please Enter A Valid Response"; } }