PC Review


Reply
Thread Tools Rate Thread

Databinding to dropdownlist

 
 
Billy Jacobs
Guest
Posts: n/a
 
      31st Jul 2003
I have a table with two fields for a person's name.(e.g.
FirstName, LastName).

Is there a way to bind both fields with a space between
them to a dropdownlist control so that the full name is
displayed?

Thanks,

Billy Jacobs
 
Reply With Quote
 
 
 
 
Etienne Charland
Guest
Posts: n/a
 
      31st Jul 2003
Hi Billy, you can add another column to the table, set the values you want
to display in that column, and bind to it.

Etienne

"Billy Jacobs" <(E-Mail Removed)> wrote in message
news:07d701c3570c$a177e880$(E-Mail Removed)...
> I have a table with two fields for a person's name.(e.g.
> FirstName, LastName).
>
> Is there a way to bind both fields with a space between
> them to a dropdownlist control so that the full name is
> displayed?
>
> Thanks,
>
> Billy Jacobs



 
Reply With Quote
 
John
Guest
Posts: n/a
 
      31st Jul 2003
sql="Select Id, FullName=FirstName + ' ' + LastName from table";

Now you have two columns, Id and FullName, to bind to the DropDownList.

John
http://www.mallsocket.com


"Billy Jacobs" <(E-Mail Removed)> wrote in message
news:07d701c3570c$a177e880$(E-Mail Removed)...
> I have a table with two fields for a person's name.(e.g.
> FirstName, LastName).
>
> Is there a way to bind both fields with a space between
> them to a dropdownlist control so that the full name is
> displayed?
>
> Thanks,
>
> Billy Jacobs



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dropdownlist databinding problem E. Kwong Microsoft Dot NET 0 26th Nov 2008 02:19 AM
DropDownList and Databinding Tor Inge Rislaa Microsoft ASP .NET 3 17th Jan 2007 09:36 PM
databinding a Dropdownlist to another dropdownlist tshad Microsoft ASP .NET 8 19th Oct 2005 11:00 PM
databinding xml to dropdownlist Joe Gass Microsoft ASP .NET 1 30th Apr 2005 03:22 AM
DropDownList not Databinding Simon Microsoft ASP .NET 1 19th Nov 2003 07:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:06 PM.