모듈화 패턴(샌드박스) 넥스트 트리 사이트와 구글링을 통해 정리 해 보았습니다.자세한 내용은 http://www.nextree.co.kr/p7650/http://stackoverflow.com/questions/11187582/javascript-sandbox-pattern-example-implementation /*First define the modules of the sandbox. These will be defined as properties on the constructor function because this is a convenient place to keep them.*/ Sandbox.modules = {}; Sandbox.modules.returnNumbers = function(MYAPP) { //MY.. JS/JavaScript 2014. 6. 27. 17:42
Repeater 콘트롤 DataBind() 호출 시 흐름 리피터는 바인딩 메소드를 호출 하는 순간부터 aspx 에서 리피터 안에 호출한 cs단 메소를 순차적으로 호출하게 된다. 예) // CS 부분 { public void CallRepeater() { // 비하인드 소스 리피터 콘트롤 ID.DataSource = ds.Tables[0]; 리피터 콘트롤 ID.DataBind(); //1. 이 시점에서 ASPX에 있는 내부 함수 차례로 호출 시작 리피터 콘트롤 ID.Dispose(); //3. 모든 호출이 끝난 상태이기 때문에 (html로 내보내짐) 콘트롤이 메모리 상에서 해제 된다 하여도 상관 없다. } //ASPX 호출 메소드 public string ChnageMoney(string price) { StringBuilder sb = new StringBui.. .NET/ASP.NET 2014. 6. 2. 13:52
제네릭 코드의 default 키워드 이게 쓸일이 있을까 하지만,,제네릭 코드를 사용하면서 기본 디폴트 값을 정할 필요가 있을때..알아두면 좋을 거 같아서 남긴다. 출처 : http://msdn.microsoft.com/ko-kr/library/xwth0h0d.aspx .NET/C#.NET 2014. 5. 9. 15:26
runat=server 에 의한 ID, NAME 변경 막는법 1. 첫번째 방법 2. 두번째 방법 해당 asp 콘트롤에 ClientIDMode="Static" 을 박는다. 3. 위의 방법대로 하지만 name은 여전히 변경됨..변경을 원하지 않을 경우 리터럴 함수를 저렇게 넣고 cs 단에서 저 값만 캣치..하면 됨 .NET/ASP.NET 2014. 4. 17. 17:41
텍스트 자르기 함수(테이블 반환) -- ================================================ -- Template generated from Template Explorer using: -- Create Scalar Function (New Menu).SQL -- -- Use the Specify Values for Template Parameters -- command (Ctrl-Shift-M) to fill in the parameter -- values below. -- -- This block of comments will not be included in -- the definition of the function. -- =========================================.. DB/MS SQL 2014. 3. 19. 09:43
[펌] 페이지 포스트백 시 포스트백을 일으킨? 콘트롤 ID 찾기.. 요즘은 다들 MVC가 대세라 웹폼 을 잘 쓰진 않지만..유지보수를 위해 아직도 필요하다..아래 예제에서 GetType()을 이용하여 원하는 콘트롤만 체크가능하게 한다면 유용하게 써먹을 수 있을거 같다. 출처 : http://stackoverflow.com/questions/3018280/asp-net-during-page-load-how-can-i-get-the-id-of-the-control-that-submitted For anyone who might interested in this (at least what worked for me). Cen provided the answer. In your Page_Load event add: Control c= GetPostBackControl(this.P.. .NET/ASP.NET 2014. 3. 19. 08:49
IEnumerable을 지원할 경우 Linq활용 IEnumerable을 지원할 경우, List jucha_list = new List(); var list_data = _list.AsEnumerable(). Select(_data=> new { Name = GetJucha(_data, "name"), Value = GetJucha(_data, "value") }); foreach (var data in list_data) { .... } .NET/C#.NET 2014. 3. 18. 14:15
[펌]비하인드 코드에서 웹페이지나 웹서비스를 html로 읽어 오고 싶을때.. 환경 : Visual Studio 2010 예제 파일 : 출처 : http://fivewind.tistory.com/m/post/view/id/91 public static string SeverControlToHtml(Control control) { System.IO.StringWriter sw = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter hw = new HtmlTextWriter(sw); control.RenderControl(hw); return sw.ToString(); } Boost ASP.NET performance with deferred content loading [WebMethod] public string GetRSSR.. .NET/ASP.NET 2014. 3. 6. 16:59
[펌]IOS 의 Ibeacon(아이비콘) 이야기 블투 4.0 을 지원하는 모든 기기들에 한해서 근접 위치 정보 서비스를 활용 할수 있는 좋은 소식 인거 같습니다.. 나온지는 오래? 되었지만..우리나라에선 조용하네요^^ 주소 : http://osxdev.org/forum/index.php?threads/%EC%A2%8C%EC%B6%A9%EC%9A%B0%EB%8F%8C-ibeacon-%EA%B5%AC%ED%98%84%EA%B8%B0-1.283/ 끄적끄적 2014. 2. 28. 13:15