-
-
-
-
- private void getContentToHtml(string theaspxURL,string theHtmlURL)
- {
- HttpWebRequest hwq = (HttpWebRequest)WebRequest.Create(theaspxURL);
- hwq.Method = "GET";
- hwq.ContentType = "application/x-www-form-urlencoded;charset=utf8";
- WebResponse hwr = (WebResponse)hwq.GetResponse();
- byte[] bytes = new byte[hwr.ContentLength];
- Stream stream = hwr.GetResponseStream();
-
-
- stream.Read(bytes, 0, Convert.ToInt32(hwr.ContentLength));
-
- string filePath = theHtmlURL;
- filePath = Server.MapPath(filePath);
- File.WriteAllBytes(filePath, bytes);
- }
posted on
2008-10-16 15:09
叮叮猫的编程世界
阅读(
190)
评论()
编辑
收藏
举报