본문 바로가기
반응형

IT-개발,DB729

[IT] ASP.NET 자바스크립트 submit() 함수기능 __doPostBack() 과 Page.GetPostBackEventReference()함수 ASP.NET 개발을 할 때 submit() 기능을 사용하려고 하면 에러가 발생하는 경우가 있다. 이럴 때 버튼 이벤트 등을 이용해서 자바스크립트로 Behind code(.cs)의 메서드를 실행해야할 때가 발생한다. 이럴 경우 보통은 aspx 화일에서 자바스크립트로 __doPostBack() 메서드를 정의해서 사용하면 가능한다. 하지만, 이보다 더 좋은 방법이 있다. __doPostBack() 메서드는 .net에서 자동 생성하는 부분으로, 개발자가 별도로 작성하여도 바뀔 가능성이 있다. 또한, .net에서 자동으로 생성하지 않는 경우도 발생한다. 자바스크립트에서 behind code의 메서드를 실행하고 싶을 때는.. 2010. 4. 20.
[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.
[ASP.NET/C#] 하드웨어 정보 얻는 방법 How To Get Hardware Information (CPU ID, MainBoard Info, Hard Disk Serial, System Information , ...) Introduction For numerous reasons, you may need to access system hardware information. One example is when you have created a software and you want to put a lock on that software. One of the most efficient ways to do so is to get one of the IDs of a piece of hardware in the target machine and the.. 2010. 4. 13.
[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.
반응형