Solved

How can I count records in ListView

Posted on 2009-07-07
4
254 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now