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

    ▼  FrmListBox.aspx

    <%@ Page Language=“C#” AutoEventWireup=“true”
      CodeBehind=“FrmListBox.aspx.cs” Inherits=“DevStandardControl.FrmListBox” %>
    
    <!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>리스트박스 컨트롤</title>
    </head>
    <body>
      <form id=“form1” runat=“server”>
          <div>
              <asp:ListBox ID=“lstHobby” runat=“server”
                  SelectionMode=“Multiple”></asp:ListBox>
              <hr />
              <asp:Button ID=“btnPrint” runat=“server” Text=“선택한 값 출력”
                  OnClick=“btnPrint_Click” />
              <hr />
              <asp:Label ID=“lblDisplay” runat=“server”></asp:Label>
          </div>
      </form>
    </body>
    </html>
    

    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.