This documentation is archived and is not being maintained.

FormView.BottomPagerRow Property

Gets the FormViewRow object that represents the pager row displayed at the bottom of the FormView control.

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

public virtual FormViewRow BottomPagerRow { get; }
/** @property */
public FormViewRow get_BottomPagerRow ()

public function get BottomPagerRow () : FormViewRow

Not applicable.

Property Value

A FormViewRow object that represents the bottom pager row of a FormView control.

When paging is enabled (when the AllowPaging property is set to true), an additional row called the pager row is automatically displayed in the FormView control. The pager row contains controls that allow the user to navigate to other records, and can be displayed at the top, the bottom, or both the top and bottom of the control. Use the BottomPagerRow property to programmatically access the FormViewRow object that represents the bottom pager row in the FormView control.


The BottomPagerRow property is available only after the FormView control creates the bottom pager row in the ItemCreated event.

This property is commonly used when you need to programmatically manipulate the bottom pager row, for example when adding custom content. Any modification to the BottomPagerRow property must be performed after the FormViewRow object that represents the bottom pager row has been created; otherwise, the FormView control overwrites any changes.

The following example demonstrates how to use the BottomPagerRow property to access the pager row displayed at the bottom of a FormView control. The pager row is then updated with additional content.

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<script runat="server">

  void EmployeeFormView_DataBound(Object sender, EventArgs e)

    // Get the pager row.
    FormViewRow pagerRow = EmployeeFormView.BottomPagerRow;

    // Get the Label controls that display the current page information 
    // from the pager row.
    Label pageNum = (Label)pagerRow.Cells[0].FindControl("PageNumberLabel");
    Label totalNum = (Label)pagerRow.Cells[0].FindControl("TotalPagesLabel");

    if ((pageNum != null) && (totalNum != null))
      // Update the Label controls with the current page values.
      int page = EmployeeFormView.PageIndex + 1;
      int count = EmployeeFormView.PageCount;

      pageNum.Text = page.ToString();
      totalNum.Text = count.ToString();


<html xmlns="" >
  <head runat="server">
    <title>FormView PagerTemplate Example</title>
    <form id="form1" runat="server">
      <h3>FormView PagerTemplate Example</h3>
      <asp:formview id="EmployeeFormView"
                <asp:image id="EmployeeImage"
                  imageurl='<%# Eval("PhotoPath") %>'
                  alternatetext='<%# Eval("LastName") %>' 
                <h3><%# Eval("FirstName") %>&nbsp;<%# Eval("LastName") %></h3>      
                <%# Eval("Title") %>        
          <table width="100%">
                <asp:linkbutton id="PreviousButton"
                <asp:linkbutton id="NextButton"
              <td align="right">                
                Page <asp:label id="PageNumberLabel" runat="server"/> 
                of <asp:label id="TotalPagesLabel" runat="server"/>                
        <pagersettings position="Bottom"
      <!-- 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