Solved

Saving HTML page as file with WebBrowser

Posted on 2000-03-08
10
243 Views
Last Modified: 2013-11-13
I could hardly find any documentation about the WebBrowser control.
How can I save an HTML page as a local file using the WebBrowser control ?
I can't do it with the Inet control, or using winsock since the page I'd like to save requires a cookie, received when accessing another HTML page. Therefore I'd like to navigate to the first page, get the cookie, and then navigate to the second page, and save it from the webbrowser contorl.
Other suggestions of doing it would be also gladly accepted.
0
Comment
Question by:xoz
  • 5
  • 4
10 Comments
 
LVL 32

Expert Comment

by:Erick37
ID: 2599138
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2599290
To save the webpage, you can do this:

   webbrowser1.ExecWB OLECMDID_SAVEAS,OLECMDEXECOPT_PROMPTUSER


The WebBrowser Help file is on the Visual Basic CD, however it does not get installed when you install VB.

It is located on the CD at:

   \TOOLS\UNSUPPRT\WEBBRWSR



Cheers!®©
0
 

Author Comment

by:xoz
ID: 2610232
Adjusted points to 70
0
 

Author Comment

by:xoz
ID: 2610233
This doesn't help me. I'd like to save the page without the "Save Web Page" dialog box, without the user having to press enter or write the filename.

brwWebBrowser.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_DONTPROMPTUSER pops that dialog box as well.
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2611193
Yes, the ExecWB pops up the dialogbox in both cases... In your original question you didn't mention anything about saving automatically...

On the Visual Basic CD there is a project in the \TOOLS\UNSUPPRT\HTTPEXPL directory... Load that project and see if that helps you...


Cheers!®©
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:xoz
ID: 2617341
I could find this directory on the Visual Studio CD !
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2617457
I can Email you the project if you want it...
0
 

Author Comment

by:xoz
ID: 2617535
Send it to yogevm@ascalar.co.il please!
0
 
LVL 14

Accepted Solution

by:
mcrider earned 70 total points
ID: 2617754
I sent it to your mailbox...


Cheers!®©
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2654690
Thanks for the points! Glad I could help!


Cheers!®©
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now