Solved

URL & Parameters (POST)  from IWebBrowser2 current page

Posted on 2002-06-05
7
601 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 500 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

707 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