Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to determine if a AccessDataSource is empty

Status
Not open for further replies.

JRVoyager

Programmer
Jun 18, 2003
15
SE
I am working on a small project for my company that has the purpose to read posts from a database and present it on a screen in our reception.
The data that shall be shown is people that are visiting our company today.
To get this working so have I created a repeater and bound it to an access data source so if we have visitors so do there names end up in a nice tabular form.
What i need to accomplish is that if we do not have any visitors so don't i want to show a blank screen, but instead start the local screensaver shat should be a nice slideshow of products.

Is there any property/way to examine if the AccessDataSource is empty or have returned values ?

This might be a silly question but i'm faily new to ASP.NET 2.0 so help is appreciated

Best regards

Gerth Ericsson
 
You could either get a DataTable from the repeaters datasource and use the Rows.Count method to count the rows, or you could use the Items.Count method of the repeater to count all the items that have an ItemType of Item or AlternatingItem.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top