Last post Sep 20, 2008 12:34 PM by Mikesdotnetting
Sep 18, 2008 06:11 AM|Ajay Kumar|LINK
I have one Access data base connected with my ASP.net site. When I want to fetch data it works fine.
I want to display total number of records of Access data table on my ASP.net page
That mean I have one label name lblTotalCount I want to set it’s Text property with total number of record count in Access Table so how can I do that?
Friends kindly help me.
Sep 18, 2008 07:10 AM|seven_of_nine|LINK
Assuming that you are using a DataSet, the number of records (rows) returned can be found from the Count property:
Sep 18, 2008 08:41 AM|Mikesdotnetting|LINK
SELECT COUNT(*) AS TheCount FROM Table
Sep 19, 2008 11:16 PM|Ajay Kumar|LINK
Dear Mike your answer is very good if i can use direct programming then that will run but i am using VS2005 web page desinger so it give me a controls and its properties. When i use access database it give me a AccessDataSource1 when i send SQL select command
with count it gives me a total number of rows i can set it in dropdownlist but how to set it in label's text property.
Sep 20, 2008 12:34 PM|Mikesdotnetting|LINK
To access values returned by a DataSource control, read this: