?
Solved

URL & Parameters (POST)  from IWebBrowser2 current page

Posted on 2002-06-05
7
Medium Priority
?
605 Views
Last Modified: 2013-11-20
Hi there,

I'm looking for a way to query IWebBrowser2 for the current page displayed in it, including any POST parameters that were sent to it.
I've tried using BeforeNavigate2 event and keeping track of the history myself, but it's called for every frame in the page, and if I'm redirected to the same page, it's called, but the browser doesn't add it to its history, and then I lose sync with the back/forward buttons.
Another problem is when the user presses 'backspace' to go back, no event is connected to it.
Access to the history associated with the WebBrowser would have solved it, but seems like there's not such a thing.

Thank you,

Yudi.
0
Comment
Question by:Yudi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 7056011
>>for the current page displayed in it, including any POST
parameters that were sent to it.

I'm not sure I understand your question.  POST data is sent from the browser BACK TO the server, not the other way around.
0
 

Author Comment

by:Yudi
ID: 7056016
Oh, sorry, I mean every POST data that were sent to the server before the server returned the page.
0
 
LVL 12

Expert Comment

by:migel
ID: 7056150
Hi!
is method I mentoned (beforeNavigate) in the prevous your Q. not working?
0
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 

Author Comment

by:Yudi
ID: 7056233
Hi Migel, thanks for remembering :)
Well, after some experiments, I got to the conclusion that it's not enough.
I'm trying to keep my history synchronized with the back/forward buttons, so I can know the POST data that was sent to the server for every page I got till now.
It's getting more complicated when I have more than one frame. And there are some more problems too.
The WebBrowser sometimes add the new page to the history and sometimes not (for examle, when the user clicks a link that brings him to the same page), and then my 'back/forward' buttons go out of sync.
Right now I'm working on a more complicated history tracking, but I think it might be an overkill, cause I know the WebBrowser maintains its own history, including the POST data that was sent for every page.
Sorry for the long story :) Anyway, I need something that will give me the ability to resend the request programatically for a certain page the user has been to, and I need it to work for 99% of the pages.
0
 
LVL 12

Accepted Solution

by:
migel earned 1500 total points
ID: 7056266
Hi!
you can enum all frames in the current document and catch event in the any frame you want.
IMHO you need to store brief description of the document (at least frames that it hold) and check requests from the frame (store not only post data but document URL and frame that make web request)
0
 

Author Comment

by:Yudi
ID: 7056605
Well, that's what I'm trying to do now, get the URL, post data, and every URL and post data for every frame in the current page and store it in my history, but it's a bit wierd that you cannot simply access the history information from the WebBrowser...
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

770 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