title: How to set TotalRowCount property for data pager control in paging of ListView?
body: <p>I work in listView with datapager control and create paging for list view as follows:</p>
  
  <pre><code> &lt;asp:ListView ID="lvList" runat="server"&gt;
      &lt;LayoutTemplate&gt;
          &lt;ul&gt;
              &lt;li runat="server"&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/LayoutTemplate&gt;
      &lt;ItemTemplate&gt;
          &lt;li&gt;
              &lt;/li&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:ListView&gt;
   &lt;asp:DataPager ID="List" runat="server" PageSize="10" PagedControlID="lvList"&gt;
      &lt;Fields&gt;
         &lt;asp:NumericPagerField ButtonType="Button" /&gt;
      &lt;/Fields&gt;
   &lt;/asp:DataPager&gt;
  </code></pre>
  
  <p>and I retrieve list of paged data to listview, in every page number changed data for list view will bound and get 10 rows throught specific function like this:</p>
  
  <pre><code>// this code retrieve list&lt;&gt; contains 10 rows
  lvList.DataSource=RetrievePaged(pageNumber,pageSize,sortExpression);
  lvList.DataBind();
  </code></pre>
  
  <p>when run this paging not work because the TotalRowCount=10.
  How I can change this property and set it to be total number of rows in table? </p>