2012-05-22 4 views

답변

2
string filepath = img1.ImageUrl;   
using (WebClient client = new WebClient()) 
{ 
     client.DownloadFile(filepath,Server.MapPath("~/Image/apple.jpg")); 
} 
1

이미지 경로를 아십니까? 당신은 이미지 컨트롤에서 이미지 경로를 가져온 다음 코드에서 이미지를 다운로드 할 수 있습니다 : 당신이 폴더

string filepath = img1.ImageUrl;   
using (WebClient client = new WebClient()) 
{ 
     client.DownloadFile(filepath,Server.MapPath("~/Image/apple.jpg")); 
} 

에 파일을 저장할 수 있습니다 웹 클라이언트를 사용하여 다음

Download image from the site in .NET/C#

using(WebClient client = new WebClient()) 
{ 
    client.DownloadFile("http://www.example.com/image.jpg", localFilename); 
} 
+1

thnxx 답장을 위해 – KiranSolkar

1

첫 번째 이미지의 URL을 얻고 이것은 ImageName 사과와 이미지 폴더에 이미지를 저장합니다 ...

+0

@karttik Patel thnx bro .... :) – KiranSolkar

관련 문제