private string GetWebresourceFile(string url) { WebRequest request = WebRequest.Create(url); request.Timeout = 10000; WebResponse response = request.GetResponse(); Stream resStream = response.GetResponseStream(); StreamReader sr = new StreamReader(resStream, System.Text.Encoding.UTF8); string SourceCode = sr.ReadToEnd(); resStream.Close(); sr.Close(); return SourceCode; }