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. Get Content of another website

Get Content of another website

Scheduled Pinned Locked Moved ASP.NET
htmlhelpquestion
3 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.
  • A Offline
    A Offline
    alimohammed
    wrote on last edited by
    #1

    Hi all, how can i get the HTML content of another website [as a string or something like that ]. Any help would be appreciated. Thanks in advance. Ali

    S 1 Reply Last reply
    0
    • A alimohammed

      Hi all, how can i get the HTML content of another website [as a string or something like that ]. Any help would be appreciated. Thanks in advance. Ali

      S Offline
      S Offline
      Sandeep Akhare
      wrote on last edited by
      #2

      Yes you can do that using HttpWebRequesr and response.GetResponseStream(); method that return html in stream .Play around it you will definatly get solution HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(URL); HttpWebResponse response = (HttpWebResponse)myHttpWebRequest.GetResponse(); resStream = response.GetResponseStream();

      Thanks and Regards Sandeep If you want something you never had, do something you have never done!

      A 1 Reply Last reply
      0
      • S Sandeep Akhare

        Yes you can do that using HttpWebRequesr and response.GetResponseStream(); method that return html in stream .Play around it you will definatly get solution HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(URL); HttpWebResponse response = (HttpWebResponse)myHttpWebRequest.GetResponse(); resStream = response.GetResponseStream();

        Thanks and Regards Sandeep If you want something you never had, do something you have never done!

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

        hi sandeep thanks for the help, but i had already tried this but i get the html upto the starting of tag... thanks, Ali

        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