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 - Fetching HTML code from developer tool

WebBrowser - Fetching HTML code from developer tool

Scheduled Pinned Locked Moved C#
csharphtmlhelp
11 Posts 3 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.
  • A AshwiniSH

    I am developing a .net windows application to fetch HTML from a particular web page. I am using WebBrowser control to launch the web page and trying to fetch the HTML source. But, what i am getting is HTML from View Source. There is difference between HTML source in View Source and in Developer Tool. please help me in fetching the HTML source from Developer Tool.

    D Offline
    D Offline
    Dave Kreskowiak
    wrote on last edited by
    #2

    It's not possible to answer your question. What do you mean by "Developer Tool"?? WHat do you mean by "getting the source from the developer tool" as opposed to the HTML source the brwoser gets? How do you know the difference?? Is this a website that you control and have the source for??

    A guide to posting questions on CodeProject[^]
    Dave Kreskowiak

    A 1 Reply Last reply
    0
    • D Dave Kreskowiak

      It's not possible to answer your question. What do you mean by "Developer Tool"?? WHat do you mean by "getting the source from the developer tool" as opposed to the HTML source the brwoser gets? How do you know the difference?? Is this a website that you control and have the source for??

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      A Offline
      A Offline
      AshwiniSH
      wrote on last edited by
      #3

      I mean in IE if I click on f12 I get a developer tool which will have a html code. When right click on a webpage and select view source I can see the html code. There is difference between view source html and what I see in developer tool html code. Below is the code for accessing view source html code: HtmlElementCollection objHtmlElementCollection = null; HtmlDocument objHtmlDocument = webBrowser1.Document; similarly I want to access developer tool's html code. Please help..

      D 1 Reply Last reply
      0
      • A AshwiniSH

        I mean in IE if I click on f12 I get a developer tool which will have a html code. When right click on a webpage and select view source I can see the html code. There is difference between view source html and what I see in developer tool html code. Below is the code for accessing view source html code: HtmlElementCollection objHtmlElementCollection = null; HtmlDocument objHtmlDocument = webBrowser1.Document; similarly I want to access developer tool's html code. Please help..

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #4

        There is no "developer tools source". What you're seeing is a debugger analysis of the same source you see in "View Source". There is no different "source" you can possibly get from the browser.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

        A 1 Reply Last reply
        0
        • D Dave Kreskowiak

          There is no "developer tools source". What you're seeing is a debugger analysis of the same source you see in "View Source". There is no different "source" you can possibly get from the browser.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak

          A Offline
          A Offline
          AshwiniSH
          wrote on last edited by
          #5

          The code is different in view source and developer tool source. I have a scenario where a button is being displayed as in view source, whereas in developer tool, it is displayed as . Also, when i tried accessing a web page with frames, in View Source, i could not able to see the control tags appearing inside the frame, whereas i could see those in developer tools.

          L 1 Reply Last reply
          0
          • A AshwiniSH

            The code is different in view source and developer tool source. I have a scenario where a button is being displayed as in view source, whereas in developer tool, it is displayed as . Also, when i tried accessing a web page with frames, in View Source, i could not able to see the control tags appearing inside the frame, whereas i could see those in developer tools.

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #6

            What you are seeing is the tool's interpretation of the HTML. As others have already told you there is no different source. If you want to understand the developer tool then see http://msdn.microsoft.com/library/gg589507(VS.85).aspx[^].

            Veni, vidi, abiit domum

            A 1 Reply Last reply
            0
            • L Lost User

              What you are seeing is the tool's interpretation of the HTML. As others have already told you there is no different source. If you want to understand the developer tool then see http://msdn.microsoft.com/library/gg589507(VS.85).aspx[^].

              Veni, vidi, abiit domum

              A Offline
              A Offline
              AshwiniSH
              wrote on last edited by
              #7

              Yes. Can I access this interpreted html in my code?

              L D 2 Replies Last reply
              0
              • A AshwiniSH

                Yes. Can I access this interpreted html in my code?

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #8

                No, as we have repeatedly told you, what you get from the website is the exact HTML. There are classes and methods in .NET that will help you manipulate the content but you still need to write the code to suit your requirements.

                Veni, vidi, abiit domum

                1 Reply Last reply
                0
                • A AshwiniSH

                  Yes. Can I access this interpreted html in my code?

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #9

                  No. It's not exposed by Internet Explorer. You'd have to write you own debugger/interpreter to get the same data and all you have to work with is the exact same source you see in "View Source".

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak

                  A 1 Reply Last reply
                  0
                  • D Dave Kreskowiak

                    No. It's not exposed by Internet Explorer. You'd have to write you own debugger/interpreter to get the same data and all you have to work with is the exact same source you see in "View Source".

                    A guide to posting questions on CodeProject[^]
                    Dave Kreskowiak

                    A Offline
                    A Offline
                    AshwiniSH
                    wrote on last edited by
                    #10

                    Thank you. Do you have any idea why is shown as in view source? Some pages I see as in view source but in some other pages it is different. Please help me.

                    D 1 Reply Last reply
                    0
                    • A AshwiniSH

                      Thank you. Do you have any idea why is shown as in view source? Some pages I see as in view source but in some other pages it is different. Please help me.

                      D Offline
                      D Offline
                      Dave Kreskowiak
                      wrote on last edited by
                      #11

                      That's because <button> is shorthand for an <input> with a type of "button".

                      A guide to posting questions on CodeProject[^]
                      Dave Kreskowiak

                      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