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

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