1 <%@ Page Language="C#" AutoEventWireup="true"
2 CodeFile="Search.aspx.cs" Inherits="Basic_Search" %>
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
15 검색 결과 리스트<br /><br />
16
17 <asp:GridView ID="ctlSearchList" runat="server"
18 OnPageIndexChanging="ctlSearchList_PageIndexChanging"
19 AutoGenerateColumns="false"
20 PageSize="5" AllowPaging="true">
21 <RowStyle BackColor="yellow" />
22 <AlternatingRowStyle BackColor="Blue" />
23 <Columns>
24 <asp:BoundField HeaderText="번호" DataField="Num" />
25 <asp:HyperLinkField HeaderText="제목"
26 DataTextField="Title" HeaderStyle-Width="300px"
27 DataNavigateUrlFormatString="View.aspx?Num={0}"
28 DataNavigateUrlFields="Num" />
29 <asp:TemplateField HeaderText="작성자">
30 <ItemTemplate>
31 <%# Eval("Name") %>
32 </ItemTemplate>
33 </asp:TemplateField>
34 <asp:BoundField HeaderText="작성일"
35 DataField="PostDate" HtmlEncode="false"
36 DataFormatString="{0:yyyy-MM-dd}" />
37 <asp:BoundField HeaderText="조회수"
38 DataField="ReadCount"
39 ItemStyle-HorizontalAlign="right" />
40 </Columns>
41 </asp:GridView><br />
42
43 <asp:Button ID="btnEnd" runat="server" Text="종료"
44 OnClick="btnEnd_Click" />
45
46 </div>
47 </form>
48 </body>
49 </html>
50