Databind

  • Thread starter Thread starter Jay
  • Start date Start date
J

Jay

Hello all. I'm populating a dropdown box using the databind(). I'm trying to
get two values in one selection.
So far I have this:
ddlPersonType.DataTextField = "PersDtlName"

I would like to make it so the text is:

PersDtlName (PersDtlID)
John Doe (1)

Does anyone have any suggestions?

Thanks,

- J
 
Concatenate the fields in your SQL statement.

I have an example of this in the code library on my website:
www.aboutfortunate.com

Rest the "All Languages" drop down to SQL and then click on the entry
titled: "Concatenate fields in SQL Statement"

Happy coding!

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
Jay,

Here I'll copy and paste it for you:


SELECT pk_CustomerId, (lastName + ', ' + firstName) AS fullName FROM
tblCustomers



--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
Back
Top