Concatenating dropdowns datatextvalue on binding

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"
 
E

Eliyahu Goldin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top