String html = "";
HttpWebRequest req = WebRequest.Create(txtUri.Value) as HttpWebRequest;
HttpWebResponse res = req.GetResponse() as HttpWebResponse;
Stream s = res.GetResponseStream();
if (res.StatusCode == HttpStatusCode.OK)
{
using (s)
{
using (StreamReader sr = new StreamReader(s, Encoding.GetEncoding("gb2312")))
{
html =sr.ReadToEnd();
sr.Close();
}
s.Close();
}
}