简体   繁体   中英

Want to save a web page using web browser control

I have recently created a web browser for windows phone 7 using web browser control . But i want to save a web page if the user clicked on save button . And also i need to show the saved pages in another page(Page1.xaml) with the title and URL of that particular web page also with a thumbnail of that web page. Since am new to c#, I don't know how to save a web page using Isolated Storage . I have researched in so many places, but i didn't get answers. Can anyone help me with this??? My web browser name is "browsers" , textbox name is "UrlTextBox" , adn the save button name is "savebtn" . Thanks in advance for your hard work!!!

The cached files saved by the browser are not available to the app hosting the WebBrowser control so to access these files directly you'll need to download them yourself.

If you just want the text from the page then you can get this by calling SaveToString() .
If you need anything more you'll need to parse the values returned via the call to SaveToString and then request any extra files (images, javascript, css, etc.) yourself and then save everything yourself to Isolated storage. You'll also need to update the paths in everything you save to use appropriate relative paths within your IS file structure.

In terms of creating a screenshot, if you were happy to use a copy of the screen at that particular point you coudl do something like is shown at http://www.jeff.wilcox.name/2011/10/screenshots-cs-how-to-capture-screenshots-of-your-app-on-your-device/

Taking a screenshot from within a Silverlight #WP7 application. Take a look here- http://blog.galasoft.ch/archive/2010/12/28/taking-a-screenshot-from-within-a-silverlight-wp7-application.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM