Beispiel #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);
            }
        }
Beispiel #2
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            //create instance of the service
            ListBoxWeather.Items.Clear();
            AllServices.Service1Client weather = new AllServices.Service1Client();
            string input = WeatherInput.Text;

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

            foreach (string temperature in results)
            {
                //Add result to the list box
                ListBoxWeather.Items.Add(temperature);
            }
        }