This documentation is archived and is not being maintained.

PagerPosition Enumeration

Specifies the position of the pager for accessing various pages within a paginated control.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public enum PagerPosition
public enum PagerPosition
public enum PagerPosition

 Member nameDescription
BottomA pager positioned at the bottom of the control. 
TopA pager positioned at the top of the control. 
TopAndBottomPagers positioned at both the top and the bottom of the control. 

Controls that support pagination often provide a set of controls called the pager that allows the user to navigate the pages within the control. The PagerPosition enumeration represents the different locations where the pager can be displayed.

The following code example demonstrates how to use the PagerPosition enumeration to specify that the pager should be displayed at the bottom of a FormView control.

<%@ Page language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" >
  <head runat="server">
    <title>FormView AllowPaging Example</title>
    <form id="form1" runat="server">
      <h3>FormView AllowPaging Example</h3>
      <asp:formview id="EmployeeFormView"
        <pagersettings mode="Numeric"
        <pagerstyle backcolor="LightBlue"
                <asp:image id="EmployeeImage"
                  imageurl='<%# Eval("PhotoPath") %>'
                  alternatetext='<%# Eval("LastName") %>' 
                <h3><%# Eval("FirstName") %>&nbsp;<%# Eval("LastName") %></h3>      
                <%# Eval("Title") %>        
      <!-- This example uses Microsoft SQL Server and connects  -->
      <!-- to the Northwind sample database. Use an ASP.NET     -->
      <!-- expression to retrieve the connection string value   -->
      <!-- from the Web.config file.                            -->
      <asp:sqldatasource id="EmployeeSource"
        selectcommand="Select [EmployeeID], [LastName], [FirstName], [Title], [PhotoPath] From [Employees]"
        connectionstring="<%$ ConnectionStrings:NorthWindConnectionString%>" 

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0