title: BottomPagerRow is null
body: <p>I’m using code behind from Microsoft’s FormView.BottomPagerRow Property article.  I’m getting error Object reference not set to an instance of an object on Label pageNum = (Label)pagerRow.Cells[0].FindControl("PageNumberLabel");</p>
  
  <p>How do I display the pager template when there is only one record on the page?</p>
  
  <pre><code>protected void fvWriteUp_DataBound(object sender, EventArgs e)
  {
      int totalPages = fvWriteUp.PageCount;
      int itemCount = fvWriteUp.DataItemCount;
  
      // Get the pager row. From MS FormView.BottomPagerRow Property
      FormViewRow pagerRow = fvWriteUp.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) &amp;&amp; (totalNum != null))
       {
          // Update the Label controls with the current page values.
          int page = fvWriteUp.PageIndex + 1;
          int count = fvWriteUp.PageCount;
          pageNum.Text = page.ToString();
          totalNum.Text = count.ToString();
       }
   }
  &lt;PagerTemplate&gt;
      &lt;asp:Table CssClass="fvFooter" ID="RecordNav" runat="server"&gt;
          &lt;asp:TableRow
              ID="TableRow4"
              runat="server"&gt;
              &lt;asp:TableCell CssClass="recNav"&gt;
              &lt;asp:Button ID="btnFirst" CssClass="btn btnRecNav" CommandName="Page" CommandArgument="First" Text="First" runat="server" /&gt;
              &lt;asp:Button ID="btnPrevious" CssClass="btn btnRecNav" CommandName="Page" CommandArgument="Prev" Text="Previous" runat="server" /&gt;
              &lt;asp:Button ID="btnNext" CssClass="btn btnRecNav" CommandName="Page" CommandArgument="Next" Text="Next" runat="server" /&gt;
              &lt;asp:Button ID="btnLast" CssClass="btn btnRecNav" CommandName="Page" CommandArgument="Last" Text="Last" runat="server" /&gt;
              &lt;/asp:TableCell&gt;&lt;asp:TableCell CssClass="recCounter"&gt;
              &lt;asp:Label CssClass="lblRecs" ID="lblRecs1" runat="server" Text="Record"&gt;&lt;/asp:Label&gt;
              &lt;asp:Label CssClass="lblRecCount" ID="PageNumberLabel" runat="server"&gt;&lt;/asp:Label&gt;
              &lt;asp:Label CssClass="lblRecs" ID="lblRecs2" runat="server" Text="of"&gt;&lt;/asp:Label&gt;
              &lt;asp:Label CssClass="lblRecCount" ID="TotalPagesLabel" runat="server"&gt;&lt;/asp:Label&gt;
              &lt;/asp:TableCell&gt;&lt;asp:TableCell&gt;&lt;/asp:TableCell&gt;&lt;/asp:TableRow&gt;&lt;/asp:Table&gt;
  &lt;/PagerTemplate&gt;
  &lt;PagerSettings FirstPageText="First" LastPageText="Last" Mode="NextPreviousFirstLast" NextPageText="Next" PreviousPageText="Previous" Position="Bottom" /&gt;
  </code></pre>
  
  <p>I’ve tried code like this in PreRender without luck</p>
  
  <pre><code>protected void fvWriteUp_PreRender(object sender, EventArgs e)       
  {
      FormViewRow pagerRow = fvWriteUp.BottomPagerRow;
          if (pagerRow != null &amp;&amp; pagerRow.Visible == false)
          {
              pagerRow.Visible = true;
              fvWriteUp.BottomPagerRow.Visible = true;
          }
  }
  </code></pre>