将完整的网站页面保存到客户端 [英] Save complete Website Page To The Client Side

查看:98
本文介绍了将完整的网站页面保存到客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



当我按ctrl + s并选择另存为类型到网页完成时,任何人都可以告诉我,然后整页保存在客户端在谷歌浏览器中没有包括任何其他文件,如图像,JavaScript等。

可以在asp.net中开发相同的东西....通过单击按钮,让我们假设另存为然后将当前页面保存在客户端。



请提供片段或良好的学习链接。



我搜索了很多,但没有得到关于这个主题的好答案



我使用下面的代码但没有得到完整的页面



string p =http://codeproject.com;

string r = @c:/users/abc/desktop/testVersion.html;

System.Net.WebClient webclient = new WebClient();

webclient.DownloadFile(p,r);



Please建议,非常感谢提前

解决方案

< blockquote>为什么不呢?在大多数一般形式中,它意味着使用 Web抓取的技术:

http: //en.wikipedia.org/wiki/Web_scraping [ ^ ]。



详情请见我过去的答案:

http://en.wikipedia.org/wiki/Web_scraping [ ^ ],

从网页获取特定数据 [ ^ ],

如何从其他网站获取数据 [ ^ ]。



-SA


Hi All,

Can any one tell me when I press ctrl+s and select "Save As Type" to Webpage Complete then whole page is saved on the client side in google chrome without including any other files like images, javascript etc.
Can The Same Thing be developed in asp.net....By clicking on the button, Let Suppose "Save As" then that current page be saved on the client side.

Please Provide snippet or good links to study.

I searched a lot but not getting good answer regarding this topic

I used the below snippet but not getting complete page

string p = "http://codeproject.com";
string r = @"c:/users/abc/desktop/testVersion.html";
System.Net.WebClient webclient = new WebClient();
webclient.DownloadFile(p, r);

Please Suggest, Thanks A Lot In Advance

解决方案

Why not? In most general form, it means using techniques of Web scraping:
http://en.wikipedia.org/wiki/Web_scraping[^].

For further detail, please see my past answers:
http://en.wikipedia.org/wiki/Web_scraping[^],
get specific data from web page[^],
How to get the data from another site[^].

—SA


这篇关于将完整的网站页面保存到客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆