I am at a loss here... (Visual Studio 2012 VB, MSSQL 2008)
Is there a way to count the number of records in a sqldatasource without displaying a grid on my page?
How can I get the number of records that are returned? another question I have a field "MessageStatus" how can I get the number or records that are listed as "new" as well... Here is what I would like to display...Code:<asp:SqlDataSource ID="sqlMessages" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>" SelectCommand="SELECT * FROM [Messages] WHERE ([SentTo] = @SentTo) ORDER BY [MessageDate] DESC"> <SelectParameters> <asp:SessionParameter Name="SentTo" SessionField="MemberID" Type="Int32" /> </SelectParameters> </asp:SqlDataSource>
lblMessages.text = "Total Message: " WHAT DO I PUT HERE "Total New Messages: " WHAT DO I PUT HERE????


Reply With Quote