asp.net - show the count of records found in the asp listview -
i thought eaiser, can't seem find simple solution it. have listview:
<asp:listview id="lvsearchresults" runat="server" datasourceid="dssearchresults"> <itemtemplate> <tr style=""> <td> <asp:label id="postdatelabel" runat="server" text='<%# eval("post_date") %>' /> </td> </tr> </itemtemplate> <layouttemplate> <table id="table2" runat="server"> <tr id="tr1" runat="server"> <td id="td1" runat="server"> <table id="itemplaceholdercontainer" runat="server" border="0" style=""> <tr> <th runat="server">found rows</th> </tr> <tr id="tr2" runat="server" style=""> <th id="th1" runat="server">post date</th> </tr> <tr id="itemplaceholder" runat="server"> </tr> </table> </td> </tr> <tr id="tr3" runat="server"> <td id="td2" runat="server" style=""> <asp:datapager id="datapager1" runat="server" pagesize="15"> <fields> <asp:numericpagerfield buttontype="link" buttoncount="10" /> </fields> </asp:datapager> </td> </tr> </table> </layouttemplate> </asp:listview>
my datasource:
<asp:sqldatasource id="dssearchresults" runat="server" connectionstring="<%$ connectionstrings:cdrconnectionstring %>" selectcommand="usp_search" selectcommandtype="storedprocedure" > </asp:sqldatasource>
what display count of records found. list view appear like:
found 123 records post date 6/1/13 6/2/13 etc.
i tried playing container, didn't seem offer anything, googled, couldn't find much. advice?
just place literal (better label) above listview (outside markup) , set tekst value when databinding.
Comments
Post a Comment