Solved

How can I count records in ListView

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Name space syntax error 12 57
Error handling in asp.net site 5 26
Switching Visual Studio 2015 to normal debug display 3 26
C# LINQ ForEach() question 6 28
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…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

773 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