Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- MSsql
- Apache Lucene
- 이클립스
- varags
- MS-SQL
- STS
- SpringSource Tool Suite
- Redirect
- asp.net
- Maven
- javascript
- TextBox
- 안드로이드
- 자바
- decompiler
- 웹뷰
- Web Service
- Bootstrap
- MANTIS
- WebView
- Java
- Eclipse
- 컬럼명
- html
- Android
- 자바스크립트
- scrollView
- 웹 서비스
- C#
- jsp
Archives
- Today
- Total
bboks.net™
C# 웹에서 파일 다운받기 본문
C#에서 웹에 있는 파일을 다운 받는 방법은 두가지가 있다. 둘다 WebClient 객체를 사용하지만 하나는 파일 다운만, 다른 방법은 Stream을 이용해 처리가 가능한 방법이다.
여기서는 파일 다운로드 방법만 소개한다. 나머지 방법은 아래의 출처에서~
[출처] Download And Upload A File Using C#
여기서는 파일 다운로드 방법만 소개한다. 나머지 방법은 아래의 출처에서~
using System.Net;
class Program
{
static void Main(string[] args)
{
try
{
WebClient client = new WebClient();
client.DownloadFile("http://www.google.co.kr/index.html",
"c:\\index.html");
}
catch (Exception e)
{
System.Console.WriteLine(e.StackTrace);
}
}
}
[출처] Download And Upload A File Using C#