dropdownlist-concat two fields-can it be done

  • Thread starter Thread starter ctb
  • Start date Start date
C

ctb

I am not sure how to, or even if you can do this. I have
tried several things.
I have a drop down list that is databound to a
datareader. I wish to set the DataTextField to a
concatentation of first and last name that are stored in
the database.

any idea if there is a way to do this?
Thanks
 
I will try this, especially the first option
but, one more question
I also bind the datafieldvalue to the Member_id in the
drop down list.
In my select statement can I select another field
(member_id) in addition to the concatenated fields in the
AS clause.
 
Yes, you can select as many fields as you want!

SELECT Member_id, (lastName + ', ' + firstName) AS fullName From tblNames




--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
Back
Top