<%@ Register TagPrefix=
Namespace=
Assembly=
Codebehind=
AutoEventWireup=
<FONT face=
<mobile:Label id=
Font
<mobile:Label id=
Font
<mobile:Label id=
<mobile:Label id=
<mobile:Label id=
<mobile:Label id=
<mobile:Label id=
<mobile:Label id=
<mobile:Label id=
<mobile:Label id=
<mobile:SelectionList id=
<Item Value=
<Item Value=
<Item Value=
<Item Value=
<Item Value=
<Item Value=
<Item Value=
<Item Value=
<Item Value=
<Item Value=
<Item Value=
</mobile:SelectionList>
<mobile:Command id=
<mobile:Link id=
NavigateUrl=
頁</mobile:Link></FONT></mobile:form>
public class weather : System
protected System
protected System
protected System
protected System
protected System
protected System
protected System
protected System
protected System
protected System
protected System
protected System
protected System
protected System
private void Page_Load(object sender
// 在此處放置用戶代碼以初始化頁面
if (!Page
string city =
int start
string weather
string wea_city = weather_city(city);
wea_city = wea_city
start = wea_city
stop = wea_city
weather
weather
start =
wea_city
stop = wea_city
weather
weather
weather
start = wea_city
wea_city
stop = wea_city
wea = wea_city
wea = wea
wea = wea
wea = wea
wea = wea
wea = wea
string [] wall = null;
char[] seperator =
wall = wea
/**///////////////////////////////////////
l_city
l_wea
l_sky
/**////////
l_date
l_w
l_w
l_w
}
}
Web 窗體設計器生成的代碼#region Web 窗體設計器生成的代碼
override protected void OnInit(EventArgs e)
//
// CODEGEN: 該調用是 ASP
//
InitializeComponent();
base
}
/**//// <summary>
/// 設計器支持所需的方法
/// 此方法的內容
/// </summary>
private void InitializeComponent()
this
this
}
#endregion
private void Command
string city = s_weather
int start
string weather
string wea_city = weather_city(city);
wea_city = wea_city
start = wea_city
stop = wea_city
weather
weather
start =
wea_city
stop = wea_city
weather
weather
weather
start = wea_city
wea_city
stop = wea_city
wea = wea_city
wea = wea
wea = wea
wea = wea
wea = wea
wea = wea
string [] wall = null;
char[] seperator =
wall = wea
/**///////////////////////////////////////
l_city
l_wea
l_sky
/**////////
l_date
l_w
l_w
l_w
}
public string weather_city(string city)
string temp = null;
try
string strURL =
HttpWebRequest request;
request = (HttpWebRequest)WebRequest
request
request
string paraUrlCoded = System
//參數經過URL編碼
paraUrlCoded = paraUrlCoded +
System
System
byte[] payload;
payload =
System
//將URL編碼後的字符串轉化為字節
request
Stream writer = request
writer
writer
HttpWebResponse response;
response = (HttpWebResponse)request
Stream s;
s = response
StreamReader objReader = new
StreamReader(s
string HTML =
string sLine =
int i =
while (sLine!=null)
i++;
sLine = objReader
if (sLine!=null)
HTML += sLine;
}
HTML = HTML
HTML = HTML
int start
start = HTML
src=
stop = HTML
background=
temp = HTML
}
catch (Exception x)
}
return temp;
}
}
From:http://tw.wingwit.com/Article/program/net/201311/11568.html