Concatenating dropdowns datatextvalue on binding

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I am programatically binding a datasouce to a dropdown. It is the names of
employees that meet certain criteria. In the database they are stored as
forename and surname. Aside from concatenating them in the query how do I do
it programatically. I.e.

drp.DataTextName = "Forename" & "Surname"
 
Dropdown list databinding abilities are limited. You can't use databinding
expressions that could help you in case of gridview, datalist or repeater.
So just read your data, create an array of names and databind to this array.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
 
Back
Top