Question about Repeater

L

laurence chang

I'm using a repeater to display a query result from sql table. I bind
the repeater to a sqldatareader. I set repeater's template to a table. I
can display query result very well, but some time the query return
nothing, so I want add a condition for repeater, when query return null
I just display the head of table and give user a message. How can i
realize it? Thanks ahead.

Laurence
 
K

Kevin Spencer

A Repeater control doesn't have columns. It has HTML and Controls in it. Put
the Repeater in a Panel, and your "Zero Records" message into another panel.
When you get nothing, make the other Panel visible, and the Repeater
invisible, and vice versa.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 

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

Top