Results 1 to 4 of 4

Thread: WebBrowser QueryString

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2007
    Posts
    10

    Smile WebBrowser QueryString

    I won't to add something to the QueryString in WebBrowser_BeforeNavigate2 before the page is Navigated.

    Someone tips, examples, ...

    Thanks!

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: WebBrowser QueryString

    What have you tried that isn't working?

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2007
    Posts
    10

    Re: WebBrowser QueryString

    Quote Originally Posted by Hack
    What have you tried that isn't working?
    I'v tried this:

    Code:
    WebBrowser.Stop
    WebBrowser.Navigate URL + QueryStringStr, Flags, TargetFrameName, PostData, Headers:="Something: " + GetSomething() + Chr$(13) + Chr$(10)
    Apparantly I'm not getting al the post info with this method.

    Is it not possible to just say WebBrowser.AddParam(QueryStringStr) ... or something?

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: WebBrowser QueryString

    URL & QueryStringStr

    + is used to add numbers. It won't always work correctly when used to concatenate strings.

    Try
    Code:
    Debug.Print URL & QueryStringStr, Flags, TargetFrameName, PostData, Headers:="Something: " & GetSomething() & vbNewLine
    Stop
    WebBrowser.Navigate URL & QueryStringStr, Flags, TargetFrameName, PostData, Headers:="Something: " & GetSomething() & vbNewLine
    That'll give you a printout in the Immediate window, showing you what the program is feeding the browser. It'll stop at that point, so you can fix things if anything is wrong (then re-execute that line until you get it right, make changes to the WebBrowser.Navigate line and comment out the debug and stop lines).
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width