添加引用:http://www.webxml.com.cn/WebServices/WeatherWebService.asmx
.cs代码:
WeatherWebServiceSoap w = new WeatherWebServiceSoapClient("WeatherWebServiceSoap");
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindPro();
BindCity();
}
}
//province
protected void BindPro()
{
string[] pro = w.getSupportProvince();
for (int i = 0; i < pro.Length; i++)
{
ddlProv.Items.Add(new ListItem(pro[i],pro[i]));
}
}
//city
protected void BindCity()
{