public weatherDataClass getWeather(string strCity)
{
weatherDataClass _dsWeather = new weatherDataClass();
try
{
const int maxDay=5;
string []time = new string[maxDay];//存储日期,从今天开始算起
string []weather = new string[maxDay];//保存天气情况数据
string []max = new string[maxDay];//保存最高温度数据
string []min = new string[maxDay];//保存最低温度数据
string []wind = new string[maxDay];//保存风向数据
//发送一个post请求到index.jsp页面以获取城市数据
Uri uri = new Uri("http://www.weathercn.com/forecastn/forcast/index.jsp?searchname="+System.Web.HttpUtility.UrlEncode(strCity,System.Text.Encoding.GetEncoding("GB2312")));