downloading and saving an image <img> from html

  • Thread starter Thread starter news.austin.rr.com
  • Start date Start date
N

news.austin.rr.com

If I have an HTML image tag <img src="images/button.gif" ... > and i resolve
the full path how can i download the image to save it locally? is this
posible in the CF with C#?

thank you
 
You can use the HttpWebRequest / HttpWebResponse classes to retrieve the
file at the given url. Get the response stream and copy the data into a file
using the System.IO.BinaryWriter

Peter
 
Back
Top