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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Problem with WebBrowser.DocumentText

Problem with WebBrowser.DocumentText

Scheduled Pinned Locked Moved C#
helpquestioncss
2 Posts 1 Posters 1 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.
  • T Offline
    T Offline
    That Asian Guy
    wrote on last edited by
    #1

    I'm trying to search the source code of the web page, but the string I declare doesn't hold enough characters. This is my code.

    String webSource = String.Empty;
    webSource = webBrowser1.DocumentText;

    // Form2 has a richTextBox which will let one see the text
    Form2 form2 = new Form2(webSource);
    form2.Show();

    When I check this in Internet Explorer, the source of my program is less than half of what it shows as in IE. What's the problem and how can I fix it? Thanks in advance.

    T 1 Reply Last reply
    0
    • T That Asian Guy

      I'm trying to search the source code of the web page, but the string I declare doesn't hold enough characters. This is my code.

      String webSource = String.Empty;
      webSource = webBrowser1.DocumentText;

      // Form2 has a richTextBox which will let one see the text
      Form2 form2 = new Form2(webSource);
      form2.Show();

      When I check this in Internet Explorer, the source of my program is less than half of what it shows as in IE. What's the problem and how can I fix it? Thanks in advance.

      T Offline
      T Offline
      That Asian Guy
      wrote on last edited by
      #2

      I also want to add that I am trying to obtain the first image returned from a google image search. Right now, I am using the html of the search page to obtain the link to the first image. An alternative method would also be appreciated. Thanks.

      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