Solved

IE 3.0 WebBrowser Control: Getting the PostData

Posted on 1997-06-17
8
248 Views
Last Modified: 2013-12-03
When using the WebBrowser control to access web pages that submit form data, I want access to the posted data (URL encoded string) that is returned by the BeforeNavigate event.  I can access the URL and Header strings but the PostData array seems to be empty.  LBound(PostData) generates a type mismatch error and the TypeName(PostData) function returns "Empty" for non-form pages and "Empty()" when submitting on pages with form data.  Posted data is correctly being sent back to the server; I just can't seem to access it in the event callback.


0
Comment
Question by:mdn
  • 6
8 Comments
 

Author Comment

by:mdn
Comment Utility
Edited text of question
0
 

Author Comment

by:mdn
Comment Utility
Adjusted points to 169
0
 

Author Comment

by:mdn
Comment Utility
Adjusted points to 295
0
 

Author Comment

by:mdn
Comment Utility
Adjusted points to 550
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:mdn
Comment Utility
Adjusted points to 725
0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 720 total points
Comment Utility
I'm not sure if you're still interested, but I haven't seen anybody attempted to answer your question, so I'm going to take a shot at it.

I've created an application using CWebBrowser2 and trapped its events in a MDI view, in particular the OnBeforeNavigate2. I've been able to get some PostData. In my testing, I see that I get information in the argument. The PostData itself is a pointer to a variant which contains another variant. The variant in my case is a VT_BSTR variant which contains a string. Are you not seeing this?

Note that I'm using IE4.0 to try this. I unfortunately do not have the IE3.x product to see if the same thing happens there.
0
 

Author Comment

by:mdn
Comment Utility
What is CWebBrowser2 ? I'm using the WebBrowser control that comes with Visual Basic 5.0.  You also mentioned that you are using IE4.0.  I'm not even using a browser.  I built a standalone applicaiton that allows me to browse to a page on a server and submit form data.  I should be able to trap the form data that is being passed back to the server, but I can't.  Where does one find CWebBrowser2 ?

0
 

Expert Comment

by:execbase
Comment Utility
CWebBrowser2 ist a C++ class. He use C++ instead of Visual Basic. You have to install IE4.0 to use CWebBrowser2 and with IE3.0 you can olny use CWebBrowser which is the old version.
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 surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

771 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

14 Experts available now in Live!

Get 1:1 Help Now