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. Is the VS 2005 Webbrowser really ready for prime time?

Is the VS 2005 Webbrowser really ready for prime time?

Scheduled Pinned Locked Moved C#
csharpvisual-studiodebuggingquestion
2 Posts 2 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.
  • C Offline
    C Offline
    cweeks78681
    wrote on last edited by
    #1

    I am trying to use the Webbrowser control that is available in VS 2005 C# Express (.NET 2.0) to automate navigation through a set of web pages programmatically. I've run into two situations where I cannnot access the OuterHtml property of an HtmlElement. Looking at the debugger seems to say that some kind of underlying exception occurs. 1. I want to select an item in a listbox on a web page by changing the OuterHtml of two of the member elements from: to The attempt to remove the 'selected' string from the first entry fails completely and even messes up the entire listbox 2. I want to iterate through the frames on a web page to find the one I want to enter some text into. When I try to access (read, not write) the OuterHtml property of a frame to see if it is the one I want I see some kind of access violation in the debugger. Shouldn't this work? Does it make sense to try to use the unmananged interfaces IHTMLDocument, IHTMLDocumet2, etc. when the Webbrowser fails like this? Can I mix the use of the Webbrowser control with use of the unmanaged interfaces?

    J 1 Reply Last reply
    0
    • C cweeks78681

      I am trying to use the Webbrowser control that is available in VS 2005 C# Express (.NET 2.0) to automate navigation through a set of web pages programmatically. I've run into two situations where I cannnot access the OuterHtml property of an HtmlElement. Looking at the debugger seems to say that some kind of underlying exception occurs. 1. I want to select an item in a listbox on a web page by changing the OuterHtml of two of the member elements from: to The attempt to remove the 'selected' string from the first entry fails completely and even messes up the entire listbox 2. I want to iterate through the frames on a web page to find the one I want to enter some text into. When I try to access (read, not write) the OuterHtml property of a frame to see if it is the one I want I see some kind of access violation in the debugger. Shouldn't this work? Does it make sense to try to use the unmananged interfaces IHTMLDocument, IHTMLDocumet2, etc. when the Webbrowser fails like this? Can I mix the use of the Webbrowser control with use of the unmanaged interfaces?

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      My guess is that the managed web browser is failing because the underlying unmanaged browser is failing. You can try though; you can mix the managed layer with the underlying native interfaces. You can do this by casting the webBrowser.Document.DomDocument object to IHtmlDocument2 and going from there.

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Is Jesus the Jewish Messiah? The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      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