Get content of External URL : HOW ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • user

    Get content of External URL : HOW ?

    Hello,
    With ASP.NET 2, how to have the content of an external URL page (html) and
    put it in my aspx page ???

    Thanks a lot !!


  • Mark Rae [MVP]

    #2
    Re: Get content of External URL : HOW ?

    "user" <user@user.comw rote in message
    news:62F0C7E6-CDE5-4CDF-AF23-73FE03D94FA5@mi crosoft.com...
    With ASP.NET 2, how to have the content of an external URL page (html) and
    put it in my aspx page ???



    --
    Mark Rae
    ASP.NET MVP


    Comment

    • user

      #3
      Re: Get content of External URL : HOW ?

      Ok it's works...but how to hide the source ??? i see in the state view that
      IE load the url what i put in iframe...
      Possible to hide Internet explorer View state when it load a page ???

      Thanks a lot !!!!

      "Mark Rae [MVP]" <mark@markNOSPA Mrae.neta écrit dans le message de
      news:uFFLYmYIJH A.2580@TK2MSFTN GP05.phx.gbl...
      "user" <user@user.comw rote in message
      news:62F0C7E6-CDE5-4CDF-AF23-73FE03D94FA5@mi crosoft.com...
      >
      >With ASP.NET 2, how to have the content of an external URL page (html)
      >and put it in my aspx page ???
      >

      >
      >
      --
      Mark Rae
      ASP.NET MVP
      http://www.markrae.net

      Comment

      • John Timney \(MVP\)

        #4
        Re: Get content of External URL : HOW ?

        httpwebrequest will get you the html


        Then you'll need to strip out what you can't use, like the html wrappers,
        and body wrappers.

        Regards

        John Timney (MVP)




        "user" <user@user.comw rote in message
        news:62F0C7E6-CDE5-4CDF-AF23-73FE03D94FA5@mi crosoft.com...
        Hello,
        With ASP.NET 2, how to have the content of an external URL page (html) and
        put it in my aspx page ???
        >
        Thanks a lot !!
        >
        >

        Comment

        • Mark Rae [MVP]

          #5
          Re: Get content of External URL : HOW ?

          "user" <user@user.comw rote in message
          news:8D5181F1-8527-4DB3-8F1D-FE2A6FAAF401@mi crosoft.com...

          [please don't top-post]
          >>With ASP.NET 2, how to have the content of an external URL page (html)
          >>and put it in my aspx page ???
          >>
          >http://www.google.co.uk/search?sourc...eNET%22+iFrame
          >
          Ok it's works...but how to hide the source ??? i see in the state view
          that IE load the url what i put in iframe...
          Possible to hide Internet explorer View state when it load a page ???
          No.


          --
          Mark Rae
          ASP.NET MVP


          Comment

          • user

            #6
            Re: Get content of External URL : HOW ?

            And if the external url is a link to a pdf file (not a plain html file)....
            possible ???

            Thanks a lot !!!!

            "John Timney (MVP)" <xyz_john@timne y.eclipse.co.uk a écrit dans le message
            de news:qPqdnTbwSN VrUkLV4p2dnAA@e clipse.net.uk.. .
            httpwebrequest will get you the html

            >
            Then you'll need to strip out what you can't use, like the html wrappers,
            and body wrappers.
            >
            Regards
            >
            John Timney (MVP)


            >
            >
            "user" <user@user.comw rote in message
            news:62F0C7E6-CDE5-4CDF-AF23-73FE03D94FA5@mi crosoft.com...
            >Hello,
            >With ASP.NET 2, how to have the content of an external URL page (html)
            >and put it in my aspx page ???
            >>
            >Thanks a lot !!
            >>
            >>
            >
            >

            Comment

            • John Timney \(MVP\)

              #7
              Re: Get content of External URL : HOW ?

              System.Net.WebC lient client = new WebClient();
              client.Download File("remoteURL ", "localfilepath" );

              Regards

              John Timney (MVP)





              "user" <user@user.comw rote in message
              news:3048A186-EDEA-4A2C-AB07-19ED760CB091@mi crosoft.com...
              And if the external url is a link to a pdf file (not a plain html
              file).... possible ???
              >
              Thanks a lot !!!!
              >
              "John Timney (MVP)" <xyz_john@timne y.eclipse.co.uk a écrit dans le
              message de news:qPqdnTbwSN VrUkLV4p2dnAA@e clipse.net.uk.. .
              >httpwebreque st will get you the html
              >http://msdn.microsoft.com/en-us/libr...st(VS.95).aspx
              >>
              >Then you'll need to strip out what you can't use, like the html wrappers,
              >and body wrappers.
              >>
              >Regards
              >>
              >John Timney (MVP)
              >http://www.johntimney.com
              >http://www.johntimney.com/blog
              >>
              >>
              >"user" <user@user.comw rote in message
              >news:62F0C7E 6-CDE5-4CDF-AF23-73FE03D94FA5@mi crosoft.com...
              >>Hello,
              >>With ASP.NET 2, how to have the content of an external URL page (html)
              >>and put it in my aspx page ???
              >>>
              >>Thanks a lot !!
              >>>
              >>>
              >>
              >>
              >

              Comment

              • Mark Rae [MVP]

                #8
                Re: Get content of External URL : HOW ?

                "John Timney (MVP)" <xyz_john@timne y.eclipse.co.uk wrote in message
                news:qaydnYaMT6 ZFckLVnZ2dnUVZ8 g6dnZ2d@eclipse .net.uk...
                >And if the external url is a link to a pdf file (not a plain html
                >file).... possible ???
                >
                System.Net.WebC lient client = new WebClient();
                client.Download File("remoteURL ", "localfilepath" );
                Yes, but you'd have to know in advance that the remote content was a file
                rather than a page...

                And, if you knew that already, wouldn't you just use a hyperlink...?


                --
                Mark Rae
                ASP.NET MVP


                Comment

                • user

                  #9
                  Re: Get content of External URL : HOW ?

                  I don't want people to know the url source !!! a kind of way to hide it !!!

                  "Mark Rae [MVP]" <mark@markNOSPA Mrae.neta écrit dans le message de news:
                  ee2Bm5aIJHA.424 0@TK2MSFTNGP03. phx.gbl...
                  "John Timney (MVP)" <xyz_john@timne y.eclipse.co.uk wrote in message
                  news:qaydnYaMT6 ZFckLVnZ2dnUVZ8 g6dnZ2d@eclipse .net.uk...
                  >
                  >>And if the external url is a link to a pdf file (not a plain html
                  >>file).... possible ???
                  >>
                  >System.Net.Web Client client = new WebClient();
                  >client.Downloa dFile("remoteUR L", "localfilepath" );
                  >
                  Yes, but you'd have to know in advance that the remote content was a file
                  rather than a page...
                  >
                  And, if you knew that already, wouldn't you just use a hyperlink...?
                  >
                  >
                  --
                  Mark Rae
                  ASP.NET MVP
                  http://www.markrae.net

                  Comment

                  Working...