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 |
Tags
- Web Service
- 웹 서비스
- STS
- 자바스크립트
- C#
- decompiler
- Bootstrap
- javascript
- asp.net
- Java
- 이클립스
- 안드로이드
- WebView
- MANTIS
- Android
- MSsql
- Apache Lucene
- html
- 자바
- SpringSource Tool Suite
- TextBox
- scrollView
- varags
- Redirect
- MS-SQL
- jsp
- Eclipse
- Maven
- 컬럼명
- 웹뷰
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#