Solved

Fill a DropDownList with two columns from an SQL Database

Posted on 2011-02-15
4
590 Views
Last Modified: 2012-05-11
I have a Table in which two of the columns are "First Name" and "Last Name".

On the same page I have a Drop Down List which you can select a person from the database, but I want the two fields, "First Name" and "Last Name" to be concatenated together into just "Full Name" that shows in the Drop Down List.

Is there anyway to do this?
0
Comment
Question by:CHKillswitch
  • 2
4 Comments
 
LVL 20

Accepted Solution

by:
hes earned 250 total points
ID: 34900337
In the SQL Select [First Name] + " " + [Last Name] as FullName
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 250 total points
ID: 34906341
In case you dont want to change your SQL, this would help

http://forums.asp.net/t/1298196.aspx
0
 
LVL 20

Expert Comment

by:hes
ID: 35027669
Both methods work to do what the question asked
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now