<asp:GridView id="CustomersGridView"
datasourceid="CustomersSqlDataSource"
autogeneratecolumns="False"
allowpaging="True"
ondatabound="CustomersGridView_DataBound"
runat="server" DataKeyNames="CustomerID">
<PagerStyle forecolor="Blue" backcolor="LightBlue"/>
<PagerTemplate>
<table width="100%">
<tr>
<td style="width:70%">
<asp:label id="MessageLabel"
forecolor="Blue"
text="Select a page:"
runat="server"/>
<asp:dropdownlist id="PageDropDownList"
autopostback="true"
onselectedindexchanged="PageDropDownList_SelectedIndexChanged"
runat="server"/>
</td>
<td style="width:70%; text-align:right">
<asp:label id="CurrentPageLabel" forecolor="Blue" runat="server"/>
</td>
</tr>
</table>
</PagerTemplate>
<Columns>
<asp:BoundField DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True" SortExpression="CustomerID" />
<asp:BoundField DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName" />
<asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address" />
<asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
<asp:BoundField DataField="PostalCode" HeaderText="PostalCode" SortExpression="PostalCode" />
<asp:BoundField DataField="Country" HeaderText="Country" SortExpression="Country" />
</Columns>
</asp:GridView>
<asp:SqlDataSource id="CustomersSqlDataSource"
selectcommand="SELECT [CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country] FROM [Customers]"
connectionstring="<%$ ConnectionStrings:ConnectionString %>"
runat="server">
</asp:SqlDataSource>
</form>