You can add the following code in the pagetemplate pagination template column to convert pagination by using the built-in pagination function of the gridview!
<Pagertemplate>
<Table align = "right" bgcolor = "# e9e9e9" width = "100%">
<Tr>
<TD style = "text-align: Right">
<B> <asp: Label id = "lblpageindex" runat = "server" text = "<% # (gridview) container. parent. parent ). pageindex + 1%> "> </ASP: Label> </B> page
<B> <asp: Label id = "lblpagecount" runat = "server" text = "<% # (gridview) container. parent. parent ). pagecount %> "> </ASP: Label> </B> page
<Asp: linkbutton id = "btnfirst" runat = "server" causesvalidation = "false" commandargument = "first"
Commandname = "page" enabled = "<% # (gridview) container. namingcontainer). pageindex! = 0%>"
TEXT = "Homepage"> </ASP: linkbutton>
<Asp: linkbutton id = "btnprev" runat = "server" causesvalidation = "false" commandargument = "Prev"
Commandname = "page" enabled = "<% # (gridview) container. namingcontainer). pageindex! = 0%>"
TEXT = "Previous Page"> </ASP: linkbutton>
<Asp: linkbutton id = "btnnext" runat = "server" causesvalidation = "false" commandargument = "Next"
Commandname = "page" enabled = "<% # (gridview) container. namingcontainer). pageindex! = (Gridview) container. namingcontainer). pagecount-1%>"
TEXT = "next page"> </ASP: linkbutton>
<Asp: linkbutton id = "btnlast" runat = "server" causesvalidation = "false" commandargument = "last"
Commandname = "page" enabled = "<% # (gridview) container. namingcontainer). pageindex! = (Gridview) container. namingcontainer). pagecount-1%>"
TEXT = "last page"> </ASP: linkbutton>
<Asp: textbox id = "txtnewpageindex" runat = "server" text = "<% # (gridview) container. Parent. Parent). pageindex + 1%>"
Width = "20px"> </ASP: textbox>
<Asp: linkbutton id = "btngo" runat = "server" causesvalidation = "false" commandargument = "-1"
Commandname = "page" text = "go"> </ASP: linkbutton>
</TD>
</Tr>
</Table>
</Pagertemplate>