protected void FindTop10WordsButton_Click(object sender, EventArgs e) { RequiredServicesClient.Service1Client top10WordsServiceClient = new RequiredServicesClient.Service1Client(); String url = Url_TextBox.Text; String[] top10Words = top10WordsServiceClient.Top10Words(url); String msg = ""; try { foreach (String word in top10Words) { msg = msg + word + "\n"; } } catch (Exception ex) { } if (msg == "") { Top10WordsOutputTextBox.Enabled = true; Top10WordsOutputTextBox.Text = "Incorrect URL Please try again"; Top10WordsOutputTextBox.Enabled = false; } else { Top10WordsOutputTextBox.Enabled = true; Top10WordsOutputTextBox.Text = msg; Top10WordsOutputTextBox.Enabled = false; } }