// 글 작성시 실행 되는 함수 // 수정일 경우와 수정이 아닐 경우에 따라 처리해주는 함수 protected void Page_Load(object sender, EventArgs e) { title = ""; writer = ""; pw = ""; date = ""; content = ""; writerDisabled = ""; pwDisabled = ""; String update = Request.QueryString["update"]; boardid = Request.QueryString["boardid"]; BoardDAO boarddao = new BoardDAO(); //수정 if (update == "1") { Boards board = boarddao.Select(boardid); title = board.getBoardTitle(); pw = board.getBoardPw(); writer = board.getBoardWriter(); date = board.getBoardDate().ToString(); content = board.getBoardContent(); btnboardWrite.Text = "수정"; isUpdate = "true"; writerDisabled = "readonly"; pwDisabled = "readonly"; } }
// board 상세 데이터 가져와서 화면에 보여주는 함수 protected void Page_Load(object sender, EventArgs e) { boardid = Request.QueryString["boardid"]; isUpdated = Request.QueryString["update"]; BoardDAO boarddao = new BoardDAO(); if (boardid == "") { JustGo("Board_Main.aspx"); return; } board = boarddao.Select(boardid); txtBoardTitle.Text = board.getBoardTitle(); txtBoardWriter.Text = board.getBoardWriter(); txtBoardPw.Text = "****"; txtBoardContent.Text = board.getBoardContent(); }