How to display Message when Dataset is Null

  • Thread starter Thread starter Duppypog
  • Start date Start date
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
 
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.
 
Back
Top