N
Nathan Sokalski
I am using databinding and the Repeater control to display the results of a
database query. I normally use the DataBinder.Eval method for this, but in a
scenario I am currently dealing with I would like to be able to do something
like one of the following:
If the value from the database is True then display 'Active', if it is False
display 'Inactive'
OR
Use the value from the database as an index or key to get a value from an
array, collection, or enumeration, which will be the displayed value
I realize that both of these can easily be done using the ItemDataBound
event, but since they are very simple operations I was wondering if there is
a more efficient technique than calling ItemDataBound for every record. Any
ideas? Thanks.
Nathan Sokalski
(e-mail address removed)
http://www.nathansokalski.com/
database query. I normally use the DataBinder.Eval method for this, but in a
scenario I am currently dealing with I would like to be able to do something
like one of the following:
If the value from the database is True then display 'Active', if it is False
display 'Inactive'
OR
Use the value from the database as an index or key to get a value from an
array, collection, or enumeration, which will be the displayed value
I realize that both of these can easily be done using the ItemDataBound
event, but since they are very simple operations I was wondering if there is
a more efficient technique than calling ItemDataBound for every record. Any
ideas? Thanks.
Nathan Sokalski
(e-mail address removed)
http://www.nathansokalski.com/