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
Exchnage database restoration
Custom control communicating an event to parent form
Attempted an unsupported operation
External Monintor won't work w/ Toshiba laptop; it USED to; fn (f5) doesn't "stick"
ARP Blocking with in the domain.
import emal from and to Thunderbird
Access Report Using '=Format$' asks for Parameter when Opened
IPTV programming dominating programming language
Unable to issue commands to Tivoli Storage Manager 6.1 Server using the Administration Center Console
Is it possible to apply style, such as bold or color, to a single line in TMemo1 control?