Solved

How can I count records in ListView

Posted on 2009-07-07
4
257 Views
Last Modified: 2012-05-07
Is thier any way to count records of the list view
0
Comment
Question by:Yadtrt
  • 2
  • 2
4 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 24792762
Did you check ListView1.ListItems.Count ?
0
 
LVL 6

Author Comment

by:Yadtrt
ID: 24792769
Sorry I mean Form View
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 24792796
There are two ways to have row count:

1st is as you also mensioned that one can use rowcount keyword in the SQL statment.

2nd is that you need to assign your returned data to DataTable/Dataset/Gridview control and then you can get the row count.

Regarding to FormView you can use PageCount property which is at the end same thing like RowCount as FormView Displays only one Row at once.
0
 
LVL 6

Author Closing Comment

by:Yadtrt
ID: 31600526
thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question