如何使用C#保存网页? [英] how to save the webpage using c#?
本文介绍了如何使用C#保存网页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用c#保存网页?我需要打开一个对话框,询问保存文件的路径.
How to save the webpage using c#? I need to open a dialog asking for the path to save the file.
有帮助吗?
推荐答案
创建文件选择器,如在博客.
Create a file chooser like explained on this blog .
然后是网络客户端
WebClient Client = new WebClient ();
Client.DownloadFile("pagename", " saveasname");
这篇关于如何使用C#保存网页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文