将下面这段代码直接拷贝到GridView当中
<PagerTemplate>
<table style="font-size: 12px;">
<tr>
<td>
总共<asp:Label ID="Label1" runat="server" Text="<%#((GridView)Container.NamingContainer).PageCount %>"></asp:Label>页
</td>
<td>
第<asp:Label ID="Label2" runat="server" Text="<%#((GridView)Container.NamingContainer).PageIndex+1 %>"></asp:Label>页
</td>
<td>
<asp:LinkButton ID="LinkButton1" runat="server" CommandArgument="1" CommandName="Page"
Enabled="<%#((GridView)Container.NamingContainer).PageIndex!=0 %>">首页</asp:LinkButton>
</td>
<td>
<asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="Prev" CommandName="Page"
Enabled="<%#((GridView)Container.NamingContainer).PageIndex!=0 %>">上一页</asp:LinkButton>
</td>
<td>
<asp:LinkButton ID="LinkButton3" runat="server" CommandArgument="Next" CommandName="Page"
Enabled="<%#((GridView)Container.NamingContainer).PageIndex!=((GridView)Container.NamingContainer).PageCount-1 %>">下一页</asp:LinkButton>
</td>
<td>
<asp:LinkButton ID="LinkButton4" runat="server" CommandArgument="Last" CommandName="Page"
Enabled="<%#((GridView)Container.NamingContainer).PageIndex!=((GridView)Container.NamingContainer).PageCount-1 %>">尾页</asp:LinkButton>
</td>
</tr>
</table>
</PagerTemplate>
<EmptyDataTemplate>
没有您要找的信息!!!
</EmptyDataTemplate>