Microsoft
Software
Hardware
Network
Question : How to download an image from a website and save it in my project folder By Using .NET C#
1) How to download an image from a website and save it in my project folder; I tried the following which does not work.
WebClient Client = new WebClient();
byte[] image;
Client.UploadData("
http://
www.freeic
onsweb.com
/Freeicons
/3D_food_i
cons/
orang
e.png
", image);
I get compile error like: Use of unassigned local variable 'image'
And I am trying to make the tutorial work at:
http://www.csharpfriends.c
om/Article
s/getArtic
le.aspx?
ar
ticleID=11
5
2) How to download a gif image and then convert to jpg and save it in my client/image or in my project folder
Please give code examples.
Answer : How to download an image from a website and save it in my project folder By Using .NET C#
You should be able to use the following to get the directory to save in
Path.Combine(HttpRuntime.A
ppDomainAp
pPath, @"Images\logo.jpg")
Random Solutions
Juniper SA2500 SSL VPN and Windows 2008 R2 firewall problem
Moving shares in SBS server 2008
IP Address Contention
Copy Folder / Files From Corrupt Disk In Linux (Kubuntu)
hithavuzu.com why i see they are a referring site
HP-UNIX - compressing/zipping files that are 31GB
MacMail & Exchange Public Folders - How to access them? I don't see them...
Microsoft PKI Design
Flash device Operating System
Default PHP and If Statement Issue