见下面脚本的最后一句话:
<td class="rbodycol" height="25"><asp:datagrid id=TopicListDataGrid runat="server" Width="100%" BorderWidth="1px" BorderStyle="None" CellPadding="3" AllowPaging="True" BackColor="White" AutoGenerateColumns="False" GridLines="Vertical" DataSource="<%# ItemList %>" BorderColor="#999999" AllowSorting="True" AllowCustomPaging="True" PageSize="20" OnPageIndexChanged="TopicListDataGrid_PageIndexChanged">以上脚本相关联的后台代码:
private void TopicListDataGrid_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
ShowTopicsByPage(e.NewPageIndex);
}