Repeater/No Data message -- How?

  • Thread starter Thread starter Chad A. Beckner
  • Start date Start date
C

Chad A. Beckner

Hey all,

I have a repeater setup which pulls data from a SQL server. If there is
no data, I want to display a message "No Data". How can I do this?

Thanks in advance!

Chad
 
I usually just have a label right above my repeater that I default to not
visible. Then, when I fill up the datatable that I am going to bind to the
repeater. I check the row count. If it's 0, I hide the repeater and show
the label that says there is no data.

HTH,
-Cliff
 
I figured as much, that's what I just got done doing. So, you "can" or "can
not" add the label dynamically (at runtime) and then hide the repeater (in
essence, replacing it?)

Chad
 
I guess you could add the label dynamically... it's just a lot easier if I
don't have to worry about adding it to the page in the right place, etc. So
I just hide it. Hack? I don't think so, but, hey, that's me.

-Cliff
 
Back
Top