. Net calls to China Meteorological station web Service

Source: Internet
Author: User
Interface address Http://www.webxml.com.cn/WebServices/WeatherWebService.asmx Call Step: Project Add Service Reference-advanced-Add Web Reference simple code:   Web service name. Weatherwebservice w = new Web service name. Weatherwebservice ();            WebService as a class to operate              string[] s = new string[23];//declares a string array to hold the returned result              string city = This.textBox1.Text.Trim () ;//Get text Box entry Query City              s = w.getweatherbycityname;            Implement the method with the text box content as a variable getweatherbycityname              if (s[8] = = "")            {                MessageBox.Show ("The city for which you are not currently supported");            }            Else            {this                . Gaikuang.text = s[1] + "" + s[6];                richTextBox1.Text = s[10];            }

  

. Net calls to China Meteorological station web Service

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.