Note that there are some explanatory texts on larger screens.

plurals
  1. POshow the count of records found in the asp listview
    primarykey
    data
    text
    <p>I thought this would be eaiser, but I can't seem to find a simple solution for it. I have a listview:</p> <pre><code>&lt;asp:ListView ID="LVSearchResults" runat="server" DataSourceID="DSSearchResults"&gt; &lt;ItemTemplate&gt; &lt;tr style=""&gt; &lt;td&gt; &lt;asp:Label ID="PostDateLabel" runat="server" Text='&lt;%# Eval("post_date") %&gt;' /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/ItemTemplate&gt; &lt;LayoutTemplate&gt; &lt;table id="Table2" runat="server"&gt; &lt;tr id="Tr1" runat="server"&gt; &lt;td id="Td1" runat="server"&gt; &lt;table id="itemPlaceholderContainer" runat="server" border="0" style=""&gt; &lt;tr&gt; &lt;th runat="server"&gt;Found Rows&lt;/th&gt; &lt;/tr&gt; &lt;tr id="Tr2" runat="server" style=""&gt; &lt;th id="Th1" runat="server"&gt;Post Date&lt;/th&gt; &lt;/tr&gt; &lt;tr id="itemPlaceholder" runat="server"&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr id="Tr3" runat="server"&gt; &lt;td id="Td2" runat="server" style=""&gt; &lt;asp:DataPager ID="DataPager1" runat="server" PageSize="15"&gt; &lt;Fields&gt; &lt;asp:NumericPagerField ButtonType="Link" ButtonCount="10" /&gt; &lt;/Fields&gt; &lt;/asp:DataPager&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/LayoutTemplate&gt; &lt;/asp:ListView&gt; </code></pre> <p>My Datasource:</p> <pre><code> &lt;asp:Sqldatasource ID="DSSearchResults" runat="server" ConnectionString="&lt;%$ ConnectionStrings:CDRConnectionString %&gt;" SelectCommand="usp_Search" SelectCommandType="StoredProcedure" &gt; &lt;/asp:Sqldatasource&gt; </code></pre> <p>What I would like to do is display the count of records found. So the list view would appear like:</p> <pre><code>Found 123 records Post Date 6/1/13 6/2/13 etc. </code></pre> <p>I tried playing with the Container, but that didn't seem to offer anything, googled, also couldn't find much. Any advice?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload