본문 바로가기

.NET/ASP.NET

(43)
.NET 성능 향상 팁(이글은 아래의 블로그에서 발췌한 글입니다.) http://blog.daum.net/thermidor/5173721 ◆ Performance Tips for All Applications 1. Exception 처리를 가급적 줄여라 : 매 Exception 처리마다 성능이 엄청나게 떨어진다. 예) 예제에서 throw Exception을 주석처리하고 실행속도를 비교해보라! public static void Main(string[] args){ int j = 0; for(int i = 0; i < 10000; i++){ try{ j = i; throw new System.Exception(); } catch {} } System.Console.Write(j); return; } ☞ 런타임이 발생시키는 Exception도 있으므로 주의할 것. 예) Res..
FileUpload한 Excel Data를 Ms Sql에 업데이트 하는 방법(Open Source이용) http://exceldatareader.codeplex.com/ 1.위의 라이브러리를 다운받아 프로젝트에 참조한다. 2. 업로드된 데이터가 있는지 확인한다. DataSet result; using (Stream stream = Request.Files[0].InputStream) { IExcelDataReader excelReader; if (fileExtension.Equals("xls", StringComparison.OrdinalIgnoreCase)) excelReader = ExcelReaderFactory.CreateBinaryReader(stream); else excelReader = ExcelReaderFactory.CreateOpenXmlReader(stream); excelReader..
새로운 Editor가 릴리즈 됐습니다. ML Editor가 추가된 Ajax Control Toolkit이 릴리즈 됐습니다. 다운로드는 아래의 주소에서 받을 수 있습니다. http://AjaxControlToolkit.CodePlex.com 형태는 아래의 이미지와 같습니다. 아래의 코드는 위의 에디터를 삽입하는 코드입니다. Simple