Does data have to be bound to something to display it?

D

darrel

I've been working on a few userControls that display data. I've been using
datalists and repeater controls for this. I bind the data to the datalist or
repeater, then display it.

However, sometimes I just need to pull up one record. Is it incorrect to use
a datalist or repeater to just show one record? Is there a different control
I should be binding data to when only showing one record?

-Darrel
 
C

Curt_C [MVP]

it will work, just return the one record.
It's probably a bit more overhead to use that type of control but in reality
it should matter little.
 
D

darrel

it will work, just return the one record.
It's probably a bit more overhead to use that type of control but in reality
it should matter little.

Thanks Curt. In the name of 'perfect code' what would you recommend to
reduce the overhead if not using something like a repeater control?

Admittedly, I overthink these sometimes. ;o)

-Darrel
 

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

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top