473,320 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Databinding to dropdownlist

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
Jul 19 '05 #1
2 1853
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" <bi********@csa.com> wrote in message
news:07****************************@phx.gbl...
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

Jul 19 '05 #2
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" <bi********@csa.com> wrote in message
news:07****************************@phx.gbl...
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

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Leon Shaw | last post by:
have two Dropdownlist and one which is containing States and one containing Cities. I know how to do all the little databinding task in visual studios interface as well as set the relationship...
2
by: Leon Shaw | last post by:
have two Dropdownlist and one which is containing States and one containing Cities. I know how to do all the little databinding task in visual studios interface as well as set the relationship...
4
by: JV | last post by:
It's easy to databind a listbox or dropdownlist if all you want is to fill it with a list of values. There are plenty of examples in the online help. Unfortunately, real world applications...
1
by: Joe Gass | last post by:
I'd like to bind some xml to a dropdownlist <engines> <engine name="test1" id="1" /> <engine name="test2" id="2" /> </engines> If I do: ddlEngines.DataSource =...
2
by: Nathan Sokalski | last post by:
I have several DropDownList controls on my page that use databinding. However, I want to give users the option of selecting a choice such as "None Selected" or something else that shows they did...
0
by: Simon Gregory | last post by:
I am currently attempting to figure out how the new databinding stucture works in ASP.NET 2.0 after working with v1.0 & v1.1 for several years. It seems that if you wish to do set up databinding...
1
by: CorporateCoder | last post by:
Hi, I am trying to bind the selected value of a databound dropdown box in a databound gridview control to the value being displayed in the template column the dropdown box has been added to. ...
0
by: brian.newman | last post by:
I've created a dropdownlist whose values are drawn from an Access database. This list of items represents a user account. In the same record is a boolean field which records whether the user is...
3
by: Tor Inge Rislaa | last post by:
DropDownList and Databinding I have a DropDownList on my WebFrom, bound to a data source. When the form is loaded the first Item in the list of the control is selected by default. Is there a...
0
by: =?Utf-8?B?cGhpbGptY2c=?= | last post by:
I've seen this question asked 100 times, but with no reasonable answer, other than to extend a control etc. Sorry if I'm going over old ground. I've a DropDownList inside a FormView control,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.