제목 : 7. 출력 페이지 UI 작성(List.aspx) 업그레이드(페이징 처리)
<%@ Register TagPrefix="uc1" TagName="BoardHeader" Src="BoardHeader.ascx" %>
<%@ Register TagPrefix="uc1" TagName="BoardFooter" Src="BoardFooter.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="List.aspx.vb" Inherits="aspdotnetwithvb.List"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>List</title>
<LINK href="global.css" type="text/css" rel="stylesheet">
</HEAD>
<body leftMargin="0" topMargin="0">
<form id="List" method="post" runat="server">
<P><uc1:boardheader id="BoardHeader1" runat="server"></uc1:boardheader></P>
<P align="center"><asp:datagrid id="DataGrid1" runat="server" DataKeyField="Num" AutoGenerateColumns="False" GridLines="Horizontal"
CellPadding="4" BackColor="White" BorderWidth="3px" BorderStyle="Double" BorderColor="#336666" AllowPaging="True"
PageSize="5">
<Columns>
<asp:HyperLinkColumn DataNavigateUrlField="Num" DataNavigateUrlFormatString="Content.aspx?Num={0}" DataTextField="Title"
HeaderText="제목">
<HeaderStyle Width="300px"></HeaderStyle>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:HyperLinkColumn>
<asp:BoundColumn DataField="Name" HeaderText="작성자">
<HeaderStyle Width="70px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="PostDate" HeaderText="작성일" DataFormatString="{0:yyyy-MM-dd (tt hh:mm)}">
<HeaderStyle Width="150px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="ReadCount" HeaderText="읽음">
<HeaderStyle Width="50px"></HeaderStyle>
</asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" ForeColor="Black" Mode="NumericPages"></PagerStyle>
</asp:datagrid></P>
<P><uc1:boardfooter id="BoardFooter1" runat="server"></uc1:boardfooter></P>
</form>
</body>
</HTML>