ASP.NET使用WebService实现天气预报功能

2019-05-22 09:57:27丽君

后台代码

protected void btncheck_Click(object sender, EventArgs e)
 {
  WeatherService.WeatherWebService w = new WeatherService.WeatherWebService();
  string [] res=new string[23];
  string cityname = txtcity.Text.Trim();
  res = w.getWeatherbyCityName(cityname);
  lbtianqi.Text = cityname + " "+res[6];
  txtcityweather.Text = res[10];

 }

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持易采站长站。