示例#1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            //Create instance of service
            ListBoxWords.Items.Clear();
            AllServices.Service1Client words = new AllServices.Service1Client();
            string input = TopWordsInput.Text;

            //Call the service and store the result
            string[] results = words.Top10Words(input);

            foreach (string word in results)
            {
                //Add the result to the listbox
                ListBoxWords.Items.Add(word);
            }
        }