Blog Content

  • 12.ADO.NET - Parameters

    Category ASP.NET on 2009. 9. 25. 11:33

    입력한 범위에 대해서 값을 가져오는 예제입니다. Web.config에 [ 데이터베이스 연결문자열 지정 ] FrmParameters.aspx 번~ 번 사이의 카테고리 출력 FrmParameters.aspx.cs protected void btnSelect_Click(object sender, EventArgs e) { //[1] 변수 선언부 string first = txtFirst.Text; string second = txtSecond.Text; //[2] 커넥션 using (SqlConnection con = new SqlConnection( ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString)) { con.Open(..

    Read more
  • 11.ADO.NET - ExecuteScalar

    Category ASP.NET on 2009. 9. 25. 10:40

    예제를 위해서 Web.config에 데이터베이스 연결문자열을 입력합니다. [ Web.config ] FrmExecuteScalar.aspx 현재 카테고리 개수 : 등록된 상품 개수 : FrmExecuteScalar.aspx.cs protected void Page_Load(object sender, EventArgs e) { DisplayCategoryCount(); DisplayProductCount(); } private void DisplayProductCount() { SqlConnection con = new SqlConnection( ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString); con.Open(); ..

    Read more
이전 1 다음