본문 바로가기
반응형

ASP.NET103

[IT/개발] ASP.NET 다른 페이지로 포스트백(submit) 하기 참고: Post data to other Web pages with ASP.NET 2.0 ASP.NET 페이지는 기본적으로 PostBack 메쏘드를 활용한다. [form action="ACTION_PAGE"][/form] 형태와 같이 폼 안에 있는 action 속성에 지정한 페이지를 가지고 페이지에 할당된 변수들을 넘기게 되는데, 이를 무조건 자기자신으로 세팅하는 것이 ASP.NET의 세계라고나 할까... 그래서, 다른 페이지로 변수들을 넘길 땐 몇가지 방법이 있다. 세션에 값들을 저장한 후 넘어간 페이지에서 받아 쓴다. Server.Transfer() 메쏘드를 이용한다. Button.PostBackUrl 속성을 이용한다. 첫번째 방법이 가장 일반적이지 싶다. 일단 해당 페이지에서 버튼을 클릭했을 때 필.. 2010. 4. 19.
[IT/개발] (asp.net) textbox에 입력 문자열 지정 ASP.NET에서 페이지의 TextBox에 입력 문자열의 언어를 지정하는 방법 1. 영문만 입력 : style="ime-mode:disabled;" 2. 한글/영문 선택 : style="ime-mode:auto;" 3. 기본 한글 입력 : style="ime-mode:active;" 4. 기본 영문 입력 : style="ime-mode:inactive;" TIP : TextBox에 키 입력을 막는 방법 txtAddress1.Attributes["onkeydown"] = "return false;"; txtAddress1.Attributes["style"] = "ime-mode:disabled"; 2010. 4. 15.
[IT/ASP.NET/C#] 하드웨어 유일키 얻기 2 Contacting a Registration Server to obtain a unique registration key based on unique machine ID Introduction Sometimes in the industry, it is required to collect some unique machine information and send it to a server for the purpose of creating a unique registration key based on the hardware information. This is required in the case when the software requires a per PC registration. Thus we can .. 2010. 4. 13.
[IT/C#/ASP.NET] 하드웨어 유일키 생성 using System; using System.Management; using System.Security.Cryptography; using System.Security; using System.Collections; using System.Text; namespace Security { /// /// Generates a 16 byte Unique Identification code of a computer /// Example: 4876-8DB5-EE85-69D3-FE52-8CF7-395D-2EA9 /// public class FingerPrint { private static string fingerPrint = string.Empty; public static string Value() { .. 2010. 4. 13.
[ASP.NET] Windows Server-유용하게 이용되는 ServerVariables collection 몇 가지 ServerVariables collection 사용으로 서버 및 클라이언트 정보확인이 가능하며 여기서 얻어낸 정보로 도메인 및 설정된 언어에 따라 웹페이지 이동과 파일 업로드, 로그 분석, 약간의 보안설정 등 많은 부분에 이용이 가능합니다. APPL_PHYSICAL_PATH : E:\HOME\help_tt_co_kr\ 메타베이스 경로에 해당하는 실제(디렉터리) 경로를 반환합니다. - PATH_TRANSLATED : E:\HOME\help_tt_co_kr\servervariables\ServerVariables.asp 실제(디렉토리) 경로를 반환합니다. - HTTP_HOST : help_tt.co.kr 도메인명을 반환합니다. - HTTP_URL : /servervariables/ServerVariable.. 2010. 4. 12.
[ASP.NET] 다국어 버전 숫자 포맷, 날짜 포맷 다국어 버전을 위해 Namespace는 using System.Globalization; 을 추가한다. 숫자 포맷은 다음과 같이 사용한다. NumberFormatInfo nfi = new CultureInfo("ko-KR", false).NumberFormat; nfi.CurrencySymbol; 날짜 포맷은 다음과 같이 사용한다. DateTimeFormatInfo dfi = new CultureInfo("ko-KR", false).DateTimeFormat; DateTime myDT = new DateTime(2008, 10, 3); Response.Write(String.Format("d : {0}", myDT.ToString("d", dfi)) + " "); Response.Write(String... 2010. 4. 6.
반응형