How to display Message when Dataset is Null

D

Duppypog

I have an asp.net page using a repeater control to display a dataset. When
the dataset returned is null (no records matched the criteria) I want to
display a message to the effect "No matching records found". I can't figure
out how to do this.

Any help is greatly appreciated,
Lynnette
 
J

Jay Pondy

Add a DIV tag as HTMLGeneric with runat set to server. Before you bind to
the repeater check to see if the dataset is empty. If it is turn on the DIV
tags display property and turn off the repeater.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top