62,046
社区成员
发帖
与我相关
我的任务
分享
<table width="250" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="260" height="210"><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:artconn %>"
SelectCommand="SELECT * FROM [art] ORDER BY [art_date] DESC"></asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
CellPadding="2" DataKeyNames="art_id" DataSourceID="SqlDataSource1" PageSize="5"
Width="100%">
<PagerSettings Position="Top" />
<Columns>
<asp:BoundField DataField="art_title" HeaderText="标题" SortExpression="art_title" />
<asp:BoundField DataField="art_date" DataFormatString="{0:d}" HeaderText="发表日期" SortExpression="art_date">
<ControlStyle BorderStyle="Double" />
</asp:BoundField>
</Columns>
</asp:GridView>
</td>
</tr>
</table>