how to download img from html img tag

Discussion in 'ASP .Net' started by news.austin.rr.com, Apr 27, 2005.

  1. Hi

    I need to download an image (img) from a website without getting the entire
    page. If i already have the HTML img tag and line how can i just download
    the image and save it local?

    thanks
     
    news.austin.rr.com, Apr 27, 2005
    #1
    1. Advertising

  2. news.austin.rr.com

    Brock Allen Guest

    Check out HttpWebRequest and HttpWebResponse classes in System.Net -- it
    is very easy to do.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > Hi
    >
    > I need to download an image (img) from a website without getting the
    > entire page. If i already have the HTML img tag and line how can i
    > just download the image and save it local?
    >
    > thanks
    >
     
    Brock Allen, Apr 27, 2005
    #2
    1. Advertising

  3. In VB2005 you can do this with a single line of code:

    My.Computer.Network.DownloadFile(URL, localFilename)

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net



    "news.austin.rr.com" <> wrote in message
    news:...
    > Hi
    >
    > I need to download an image (img) from a website without getting the
    > entire
    > page. If i already have the HTML img tag and line how can i just download
    > the image and save it local?
    >
    > thanks
    >
    >
     
    Steve C. Orr [MVP, MCSD], Apr 27, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Antti Nummiaho
    Replies:
    7
    Views:
    3,276
    John C. Bollinger
    Nov 17, 2003
  2. shruds
    Replies:
    1
    Views:
    938
    John C. Bollinger
    Jan 27, 2006
  3. news.verizon.net
    Replies:
    3
    Views:
    581
    Whitecrest
    Jun 21, 2004
  4. Philipp Lenssen

    Problem: <img></img>

    Philipp Lenssen, Jun 27, 2005, in forum: XML
    Replies:
    15
    Views:
    805
    David Håsäther
    Jul 3, 2005
  5. Replies:
    1
    Views:
    423
    Andrew Thompson
    Nov 29, 2006
Loading...

Share This Page