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.
 

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

Back
Top