473,409 Members | 1,952 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,409 software developers and data experts.

Concatenating dropdowns datatextvalue on binding

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"
May 19 '07 #1
1 1372
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
"Chris" <no****@nospam.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>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"

May 20 '07 #2

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

Similar topics

2
by: Crescionini Sascha | last post by:
Hello NG If I let appear a DIV over a HTML site with dropdowns, this dropdowns are still visible. Is there a way to push them to the back? All other form elements arent visible. greets...
0
by: Jeffrey | last post by:
Hi... I have several dropdowns located in a datagrid footer. Now say i modify the selection in dropdown1. I want to refresh the content of the other dropdowns with the result of a database...
3
by: Damon | last post by:
I am working on a site in which I would like to have two dropdowns that will allow a user to navigate through the administrative pages of the site. The first would allow the user to choose the...
2
by: tshad | last post by:
I have a couple of stored procedures that are being called from my Page_Load event. They worked before, but now they are not working. I am getting the error: Specified argument was out of...
1
by: Andy | last post by:
What I want to do is to populate multiple dropdowns when editing. Presumably... a) I should use a DataReader so that I can get each ResultSet for each dropdown control, and that should cut down...
1
by: Chris Ashley | last post by:
I used the data form wizard and set up my relationships between tables... how do I make the foreign key a dropdown in the datagrid so it displays something meaningful rather than the foreign key...
3
by: Simon Harvey | last post by:
Hi everyone, I keep getting a problem with dropdownlist controls. It sounds really stupid, but my app is screwed as long as this keeps happening. It seems to spontaneously happen and then I...
0
by: bogorman | last post by:
Am trying to add a "video" to a webpage which is based on a template containing a javascript menu. The site has hundreds of pages all based on this template and the menu works fine The page can be...
0
by: sbart | last post by:
I am programing in asp.net vb using AjaxToolkit cascadingDropDown. I do not have access to AjaxToolkit cascading dropdown event handlers. I have a series of dropdowns. The selection from one of...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.