본문 바로가기 메뉴 바로가기

All & All

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

All & All

검색하기 폼
  • 분류 전체보기 (305)
    • 정보 (93)
      • 생활 속 소리 (20)
      • 여행 (1)
      • 반려동물 (2)
      • 자료 (3)
      • 차량 (2)
      • 인테리어 (0)
      • 요리 (3)
      • iPhone (20)
      • 기타 (0)
    • 기타 (2)
    • 일상 (58)
      • Movie (8)
      • Music (12)
      • 강아지 (0)
      • 맛집 (0)
      • 캠핑 (0)
      • 취미 (0)
      • 데이트 (0)
    • Favorite (30)
    • 프로그래밍 (113)
      • C샵 (12)
      • ASP (8)
      • ASP.NET (55)
      • Javascript (17)
      • Node.js (4)
      • WPF (3)
      • MS-SQL (11)
      • iPhone 개발 (3)
    • 연애 (5)
  • 방명록

2008/03/12 (2)
string.Format 형식

1. 0001더하는법 예) 0001 + 1 = 0002; string code = "K00001"; int num = Convert.ToInt32(code.ToString().Substring(1)) + 1; string ccc = string.Format("{0}{1:D5}", "k",num); 2.숫자형을 화폐형으로 int aaa = 54021532; string ccc = String.Format("{0:c}", aaa); 3.소숫점자리를 반환 int aaa = 1254; string ccc = String.Format("{0:f3}", aaa); //소숫점 3자리를 반환 4. (,) 표시하기 int str = 60000; string aaa = String.Format("{0:N0}",str);

프로그래밍/ASP.NET 2008. 3. 12. 19:15
GridView 엑셀로 저장하기

protected void btnExcel_Click(object sender, EventArgs e) { //다운로드 되도록 헤더 설정 Response.Clear(); string fileName = "Excel.xls"; Response.AddHeader("content-disposition", "attachment;filename=" + fileName); Response.AddHeader("Expires", "0"); Response.ContentType = "application/vnd.xls"; System.IO.StringWriter stringWriter = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlWriter = ne..

프로그래밍/ASP.NET 2008. 3. 12. 01:56
이전 1 다음
이전 다음
«   2008/03   »
일 월 화 수 목 금 토
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
최근에 올라온 글
Total
Today
Yesterday

Blog is powered by Tistory / Designed by Tistory

티스토리툴바