Groups | Blog | Home
all groups > asp.net > february 2004 >

asp.net : Get an image from the web



Rick Strahl [MVP]
2/8/2004 10:36:40 PM
What exactly do you need to do?

If all you want is to link the image you can just link it from your page
with an <img> tag referencing the image Url.

If you need to capture the image you can use the WebRequest class to read
the data and then do whatever you need to with it on the 'client'
application.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web


[quoted text, click to view]

Ashley
2/8/2004 11:56:06 PM
Hi all

what is the easiest way to store an image from the (e.g. http://www.internetpage.com/testimage.jpg
in a bitmap in my asp.net application
A source code sample would be nice.

Thank
Ashley
2/9/2004 1:26:16 AM
Hi Rick,

thanks for the answer. I like to store the image on disk!
I believe the first step is therefore to store the image in a bitmap object ?

Kevin Spencer
2/9/2004 9:10:44 AM
The image is already a file.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

[quoted text, click to view]

Jon
2/9/2004 2:21:36 PM
Hi,
something like this

dim url as string = "http://site.com/images/pic.gif"
Dim oWeb As New WebClient
oWeb.DownloadFile(url, "c:/images/pic.gif")

Jon

[quoted text, click to view]

AddThis Social Bookmark Button