1 <%@ Page Language="C#" AutoEventWireup="true"
2 CodeFile="List.aspx.cs" Inherits="Basic_List" %>
3
4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
7 <html xmlns="http://www.w3.org/1999/xhtml" >
8 <head runat="server">
9 <title>제목 없음</title>
10 </head>
11 <body>
12 <form id="form1" runat="server">
13 <div>
14 기본형 게시판 리스트<br />
15 <br />
16
17 <asp:GridView ID="ctlBasicList" runat="server"
18 AllowPaging="True" AutoGenerateColumns="False"
19 OnPageIndexChanging="ctlBasicList_PageIndexChanging"
20 PageSize="5">
21 <Columns>
22 <asp:BoundField DataField="Num" HeaderText="번호" />
23 <asp:HyperLinkField
24 HeaderStyle-Width="350px"
25 DataNavigateUrlFields="Num"
26 DataNavigateUrlFormatString="View.aspx?Num={0}"
27 DataTextField="Title" HeaderText="제목" />
28 <asp:BoundField DataField="Name" HeaderText="작성자" />
29 <asp:BoundField DataField="PostDate" HeaderText="작성일"
30 DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="false" />
31 <asp:BoundField DataField="ReadCount" HeaderText="조회수"
32 ItemStyle-HorizontalAlign="right"/>
33 </Columns>
34 </asp:GridView>
35
36 </div>
37 <br />
38
39 <asp:DropDownList ID="lstSearchField" runat="server">
40 <asp:ListItem Value="Name">이름</asp:ListItem>
41 <asp:ListItem Value="Title">제목</asp:ListItem>
42 <asp:ListItem Value="Content">내용</asp:ListItem>
43 </asp:DropDownList>
44 <asp:TextBox ID="txtSearchQuery" runat="server"></asp:TextBox>
45 <asp:Button ID="btnSearch" runat="server" Text="검색"
46 PostBackUrl="Search.aspx" />
47
48 <br />
49 <br />
50 <asp:Button ID="btnWrite" runat="server" Text="글쓰기"
51 OnClick="btnWrite_Click" />
52 </form>
53 </body>
54 </html>
55