N
Nathan Sokalski
I have a Repeater that uses a DataSource that has multiple fields. When the
values of these fields is displayed in the Repeater, there are fields that
are used in combination with other fields as well as by themselves. For
example, there may be a firstname field that is used in combination with a
lastname field as well as by itself. Using it by itself is simple, I have
done that many times. However, is there a way to use multiple fields in a
single databinding expression (sort of like the way you do in the
String.Format() function)? I realize that I could use string manipulation
inside the <%# %>, but that could sometimes be messier than I would like. I
also realize that I could have my database query simply return firstname+'
'+lastname and return lastname, but if I could do it in the databinding
expression it would make it easier to change my page if necessary, as well
as avoiding the need to write separate stored procedures if the same data is
used for multiple pages. Does anybody know if there is a function that can
do something like this (or whether there will be in any future versions of
..NET, I am currently using 2.0)? Thanks.
values of these fields is displayed in the Repeater, there are fields that
are used in combination with other fields as well as by themselves. For
example, there may be a firstname field that is used in combination with a
lastname field as well as by itself. Using it by itself is simple, I have
done that many times. However, is there a way to use multiple fields in a
single databinding expression (sort of like the way you do in the
String.Format() function)? I realize that I could use string manipulation
inside the <%# %>, but that could sometimes be messier than I would like. I
also realize that I could have my database query simply return firstname+'
'+lastname and return lastname, but if I could do it in the databinding
expression it would make it easier to change my page if necessary, as well
as avoiding the need to write separate stored procedures if the same data is
used for multiple pages. Does anybody know if there is a function that can
do something like this (or whether there will be in any future versions of
..NET, I am currently using 2.0)? Thanks.