개발 207

[.net] 자바스크립트에서 asp.net 비하인드 코드 실행하기

이번 프로젝트를 진행을 하다가 asp.net 의 cs 쪽에서 InnerHTML 를 이용하여 html 태그를 생성하여야 되게 되었다. 생성한 태그에 button 컨트롤이 들어 있는데 버튼 생성을 하는 것은 쉽게 되었다. 하지만 아무리 시도를 해봐도 서버쪽 이벤트가 발생하지 않았다. 그렇게 몇시간을 해매다가 검색한 글 중 보이는게 InnerHTML로 생성한 버튼에 runat="server"는 그냥 텍스트로써 역할만 할 뿐 서버 컨트롤이 될 수 없다는것. 한동안 멍하니 모니터만 쳐다 보았다. 멍하니 앉아 있을수 만은 없는법!! 열심히 방법을 찾던 중 자바스크립트를 이용하여 asp.net 비하인드 코드 메소드를 발생시킬 수 있다는 글을 발견하여 시도해 보았다. 음 필자가 제대로 습득하지 못한 이유로 몇시간을 해..

개발 2014.06.10

[javascript] ckeditor 에디터

1. 다운로드 : http://ckeditor.com/ 2. 설정12345678910111213141516171819202122 function check_form(form) { if (CKEDITOR.instances.ctnt.getData() == "") { alert("내용을 입력해주세요"); CKEDITOR.instances.ctnt.focus(); return false; } return true; } 내용 Colored by Color Scriptercs 3. 환경설정config.js 파일 편집12345678910111213141516171819202122232425262728293031323334353637383940CKEDITOR.editorConfig = function( config )..

개발 2014.06.05

[.net] IE에서 한글이름으로 된 파일 다운로드 시 오류발생 (크롬 정상 다운로드 가능)

1234567891011121314151617181920212223242526272829using System;using System.Collections.Generic;using System.Text;using System.Web;using System.Web.UI;using System.Web.UI.WebControls; public partial class gadmin_download_download: System.Web.UI.Page { protected void Page_Load( object sender, EventArgs e ) { string path = Server.MapPath( "." ); string filename = HttpUtility.UrlDecode( Request.Quer..

개발 2014.05.14

[java] 현재 페이지의 url 주소 가져오기

1234567아래와 같은 주소가 있을 경우http://localhost:8080/test/index.jsp request.getRequestURI(); //프로젝트경로부터 파일까지의 경로값을 얻어옴 (/test/index.jsp)request.getContextPath(); //프로젝트의 경로값만 가져옴(/test)request.getRequestURL(); //전체 경로를 가져옴 (http://localhost:8080/test/index.jsp)request.getServletPath(); //파일명 (/index.jsp)Colored by Color Scriptercs

개발 2014.04.22

[java] 전자정부프레임워크 초기 세팅

- 설치1. jdk 설치 http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html2. 아파치 설치 http://tomcat.apache.org/3. 전자정부프레임워크 설치 http://www.egovframe.go.kr/4. MySql 설치 http://dev.mysql.com/downloads/ - MySQL 설치1. 다운로드 : MySql Community Server → Windows MySql Installer MSI 옆 [Download] → 용량큰것 클릭 → No thanks, just start my download.2. 설치 : Install MySQLProducts → I accept the li..

개발 2014.03.31