Weather forecast web Service Usage

Source: Internet
Author: User

First, in the References under your web project, right-click References, and click Add WebRefercenes. Then, a namespace will appear under Refercens, this namespace contains classes contained in web Services. Then you add a test button on a page and write the following code in the button event: cn.com. webxml. webservice. weatherWS wws = new cn.com. webxml. webservice. weatherWS (); string [] data = wws. getWeather ("Shanghai", ""); the data array contains data about the weather conditions of Shanghai cities. Then you can process the data based on the actual situation.
 
 
WebXml.com.cn provides weather forecasts for more than 2400 Chinese cities and more than 2300 foreign cities. Data is automatically updated every 2.5 hours, which is accurate and reliable.
Author: fwj316891124

Related Article

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.