더북(TheBook)

3. FrmSqlConnection.aspx 페이지에 다음과 같이 입력한다.

▼  FrmSqlConnection.aspx

<%@ Page Language="C#" AutoEventWireup="true"
  CodeBehind="FrmSqlConnection.aspx.cs" Inherits="DevADONET.FrmSqlConnection" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>SqlConnection 클래스</title>
</head>
<body>
  <form id="form1" runat="server">
      <div>
          <asp:Button ID="btnSqlConnection" runat="server"
              Text="SQL Server에 연결하기" OnClick="btnSqlConnection_Click" />
          <hr />
          <asp:Label ID="lblDisplay" runat="server"></asp:Label>
      </div>
  </form>
</body>
</html>

 

웹 폼에 등록된 컨트롤의 주요 속성은 다음과 같다.

컨트롤

속성

Button

ID

btnSqlConnection

Text

SQL Server에 연결하기

Label

ID

lblDisplay

Text

(빈 문자열)