Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. WebBrowser API problem.

WebBrowser API problem.

Scheduled Pinned Locked Moved C#
helpcsharphtmlcomsysadmin
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GriffonRL
    wrote on last edited by
    #1

    Hello, I'm extensively using the Webbrowser control and everything is almost fine... Actually I found a strange problem. I crawl to a page containing the following code: When using the IHTMLAnchorElement and asking for the 'href' property, I get the following result: http://pubs.mgn.net/event.ng/Type=click&FlightID=6121&AdID=17734&TargetID=1165&Segments=108,143,292,365,382,1035,1227&Targets=273,1165&Values=31,43,51,60,72,81,91,100,110,150,206,213,237,474,601,625,763,934,938,940,1007,1009,1046,1253,1282,1448,1907,1963,2018&RawValues=&Redirect=http://www.fnac.com/Shelf/article.asp?PRID=1391122&Origin=2003.2.10.12.24.24.0&OriginClick=yes But If I issue an HTTP GET request, I get a 404 error (after redirection, the web server is a Netscape Entreprise Server). I know that if I use this URL instead (like IE does !), I will work: http://pubs.mgn.net/event.ng/Type=click&FlightID=6121&AdID=17734&TargetID=1165&Segments=108,143,292,365,382,1035,1227&Targets=273,1165&Values=31,43,51,60,72,81,91,100,110,150,206,213,237,474,601,625,763,934,938,940,1007,1009,1046,1253,1282,1448,1907,1963,2018&RawValues=&Redirect=http:%2F%2Fwww.fnac.com%2FShelf%2Farticle.asp%3FPRID%3D1391122%26Origin%3D2003.2.10.12.24.24.0%26OriginClick%3Dyes The difference is that the second URL has HTML decoded all & but kept all URL encoded characters. Using the debugger I found that because the WebBrowser control is misparsing the anchor, I also get wrong values for the 'search' property (of IHTMLAnchorElement) and so on. Is it a bug ? What can I do to deal with this problem and get a perfectly parsed URL ? Regards, R. LOPES Just programmer.

    G 1 Reply Last reply
    0
    • G GriffonRL

      Hello, I'm extensively using the Webbrowser control and everything is almost fine... Actually I found a strange problem. I crawl to a page containing the following code: When using the IHTMLAnchorElement and asking for the 'href' property, I get the following result: http://pubs.mgn.net/event.ng/Type=click&FlightID=6121&AdID=17734&TargetID=1165&Segments=108,143,292,365,382,1035,1227&Targets=273,1165&Values=31,43,51,60,72,81,91,100,110,150,206,213,237,474,601,625,763,934,938,940,1007,1009,1046,1253,1282,1448,1907,1963,2018&RawValues=&Redirect=http://www.fnac.com/Shelf/article.asp?PRID=1391122&Origin=2003.2.10.12.24.24.0&OriginClick=yes But If I issue an HTTP GET request, I get a 404 error (after redirection, the web server is a Netscape Entreprise Server). I know that if I use this URL instead (like IE does !), I will work: http://pubs.mgn.net/event.ng/Type=click&FlightID=6121&AdID=17734&TargetID=1165&Segments=108,143,292,365,382,1035,1227&Targets=273,1165&Values=31,43,51,60,72,81,91,100,110,150,206,213,237,474,601,625,763,934,938,940,1007,1009,1046,1253,1282,1448,1907,1963,2018&RawValues=&Redirect=http:%2F%2Fwww.fnac.com%2FShelf%2Farticle.asp%3FPRID%3D1391122%26Origin%3D2003.2.10.12.24.24.0%26OriginClick%3Dyes The difference is that the second URL has HTML decoded all & but kept all URL encoded characters. Using the debugger I found that because the WebBrowser control is misparsing the anchor, I also get wrong values for the 'search' property (of IHTMLAnchorElement) and so on. Is it a bug ? What can I do to deal with this problem and get a perfectly parsed URL ? Regards, R. LOPES Just programmer.

      G Offline
      G Offline
      GriffonRL
      wrote on last edited by
      #2

      Hello, Repost because the first URL was translated by the message board. I'm extensively using the Webbrowser control and everything is almost fine... Actually I found a strange problem. I crawl to a page containing the following code: <A href=\"/event.ng/Type=click&amp;FlightID=6121&amp;AdID=17734&amp;TargetID=1165&amp;Segments=108,143,292,365,382,1035,1227&amp;Targets=273,1165&amp;Values=31,43,51,60,72,81,91,100,110,150,206,213,237,474,601,625,763,934,938,940,1007,1009,1046,1253,1282,1448,1907,1963,2018&amp;RawValues=&amp;Redirect=http:%2F%2Fwww.fnac.com%2FShelf%2Farticle.asp%3FPRID%3D1391122%26Origin%3D2003.2.10.12.24.24.0%26OriginClick%3Dyes\" target=_blank><IMG height=63 alt=\"\" src=\"http://pub.club-internet.fr/Netgravity/Fnac/100x63_massive_070203.gif\" width=100 border=0></A> When using the IHTMLAnchorElement and asking for the 'href' property, I get the following result: http://pubs.mgn.net/event.ng/Type=click&FlightID=6121&AdID=17734&TargetID=1165&Segments=108,143,292,365,382,1035,1227&Targets=273,1165&Values=31,43,51,60,72,81,91,100,110,150,206,213,237,474,601,625,763,934,938,940,1007,1009,1046,1253,1282,1448,1907,1963,2018&RawValues=&Redirect=http://www.fnac.com/Shelf/article.asp?PRID=1391122&Origin=2003.2.10.12.24.24.0&OriginClick=yes But If I issue an HTTP GET request, I get a 404 error (after redirection, the web server is a Netscape Entreprise Server). I know that if I use this URL instead (like IE does !), I will work: http://pubs.mgn.net/event.ng/Type=click&FlightID=6121&AdID=17734&TargetID=1165&Segments=108,143,292,365,382,1035,1227&Targets=273,1165&Values=31,43,51,60,72,81,91,100,110,150,206,213,237,474,601,625,763,934,938,940,1007,1009,1046,1253,1282,1448,1907,1963,2018&RawValues=&Redirect=http:%2F%2Fwww.fnac.com%2FShelf%2Farticle.asp%3FPRID%3D1391122%26Origin%3D2003.2.10.12.24.24.0%26OriginClick%3Dyes The difference is that the second URL has HTML decoded all & but kept all URL encoded characters. Using the debugger I found that because the WebBrowser control is misparsing the anchor, I also get wrong values for the 'search' property (of IHTMLAnchorElement) and so on. Is it a bug ? What can I do to deal with this problem and get a perfectly parsed URL ? Regards, R. LOPES Just programmer.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups