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. Web Development
  3. ASP.NET
  4. how i can get a complete source code of an html page

how i can get a complete source code of an html page

Scheduled Pinned Locked Moved ASP.NET
html
8 Posts 4 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.
  • J Offline
    J Offline
    jagadeeshkumar1984
    wrote on last edited by
    #1

    iam using iframe .in that iframe i kept an html page .now on clicking a button i want the complete source code of that html page form to

    A N 2 Replies Last reply
    0
    • J jagadeeshkumar1984

      iam using iframe .in that iframe i kept an html page .now on clicking a button i want the complete source code of that html page form to

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      jagadeeshkumar1984 wrote:

      i want the complete source code of that html page form to

      You want source code for that ???:confused::confused: or you want to read the source code of that html file through program ??? :doh::sigh:

      Best Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"

      J 1 Reply Last reply
      0
      • J jagadeeshkumar1984

        iam using iframe .in that iframe i kept an html page .now on clicking a button i want the complete source code of that html page form to

        N Offline
        N Offline
        N a v a n e e t h
        wrote on last edited by
        #3

        Using Javascript ? Then you need to get the content document of IFrame and look in InnerHTML property. If you need this in server side, put a hidden server side textbox, assign the InnerHTML to this textbox using Javascript before page gets posted. Access the value from this textbox on server

        All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

        J 1 Reply Last reply
        0
        • N N a v a n e e t h

          Using Javascript ? Then you need to get the content document of IFrame and look in InnerHTML property. If you need this in server side, put a hidden server side textbox, assign the InnerHTML to this textbox using Javascript before page gets posted. Access the value from this textbox on server

          All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

          J Offline
          J Offline
          jagadeeshkumar1984
          wrote on last edited by
          #4

          sir if dont mind give the code how to write

          N 1 Reply Last reply
          0
          • A Abhijit Jana

            jagadeeshkumar1984 wrote:

            i want the complete source code of that html page form to

            You want source code for that ???:confused::confused: or you want to read the source code of that html file through program ??? :doh::sigh:

            Best Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"

            J Offline
            J Offline
            jagadeeshkumar1984
            wrote on last edited by
            #5

            sir i want to read the source code of that html file through program or a when a button was clicked i want the source code of that html page in the i frame only

            1 Reply Last reply
            0
            • J jagadeeshkumar1984

              sir if dont mind give the code how to write

              N Offline
              N Offline
              N a v a n e e t h
              wrote on last edited by
              #6

              Assume your IFrame is named "MyIframe". So InnerHTML can be taken like

              var IframeDoc = document.getElementById('MyIframe').contentWindow.document
              alert(IframeDoc.body.innerHTML);

              I hope you know how to put this to a textbox and get this in server.

              All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

              J M 2 Replies Last reply
              0
              • N N a v a n e e t h

                Assume your IFrame is named "MyIframe". So InnerHTML can be taken like

                var IframeDoc = document.getElementById('MyIframe').contentWindow.document
                alert(IframeDoc.body.innerHTML);

                I hope you know how to put this to a textbox and get this in server.

                All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

                J Offline
                J Offline
                jagadeeshkumar1984
                wrote on last edited by
                #7

                sir i used like this only with innerhtml .but iam getting only the source code from

                to

                .but iam not getting the java script which i used in the html page.

                1 Reply Last reply
                0
                • N N a v a n e e t h

                  Assume your IFrame is named "MyIframe". So InnerHTML can be taken like

                  var IframeDoc = document.getElementById('MyIframe').contentWindow.document
                  alert(IframeDoc.body.innerHTML);

                  I hope you know how to put this to a textbox and get this in server.

                  All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

                  M Offline
                  M Offline
                  Manish Thaduri
                  wrote on last edited by
                  #8

                  I want to get html source code of an URL. the user gives url in text box and upon clicking the submit button i need to get he html source code of that webpage(URL). I want this to be done using innerHTML Regards Manish T

                  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