HttpWebRequest myWebRequest = (HttpWebRequest)WebRequest.Create(@urlstr);
myWebRequest.Timeout = 10000;
myWebRequest.Method = "GET";
HttpWebResponse res = (HttpWebResponse)myWebRequest.GetResponse();
res.ContentType//这个里面一般就有编码格式了,或者res.CharacterSet。