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

Using Multiple Databinding Values In The Same Property

I have two fields in a DataSet that I want to use in the same property.
These fields are the first and last names which I want to assign to the Text
property of a Label. I can assign either one of them to the Text property as
follows:

text='<%# DataBinder.Eval(Container,"DataItem.membernames.ln ame") %>'

OR

text='<%# DataBinder.Eval(Container,"DataItem.membernames.fn ame") %>'
Either one of these will correctly display the expected value, but I need to
combine them so that both values are displayed together. How can I do this?
Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Nov 21 '05 #1
1 940
<%# DataBinder.Eval(Container,"DataItem.membernames.fn ame") + " " +
DataBinder.Eval(Container,"DataItem.membernames.ln ame") %>

for more advance dstuff, you can hook into the OnItemDataBound event.

You can learn more about all of this at:
http://openmymind.net/index.aspx?documentId=8#4

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:OR**************@TK2MSFTNGP14.phx.gbl...
I have two fields in a DataSet that I want to use in the same property.
These fields are the first and last names which I want to assign to the
Text property of a Label. I can assign either one of them to the Text
property as follows:

text='<%# DataBinder.Eval(Container,"DataItem.membernames.ln ame") %>'

OR

text='<%# DataBinder.Eval(Container,"DataItem.membernames.fn ame") %>'
Either one of these will correctly display the expected value, but I need
to combine them so that both values are displayed together. How can I do
this? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Nov 21 '05 #2

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

Similar topics

1
by: Nathan Sokalski | last post by:
I have two fields in a DataSet that I want to use in the same property. These fields are the first and last names which I want to assign to the Text property of a Label. I can assign either one of...
2
by: ECathell | last post by:
'------------------------------------------------------------------------------------------------ 'Label Formats...
7
by: Pieter | last post by:
Hi, I'm looking for a DateTimePicker that supports 100% databinding (and support null-values)... It's a shame that the normal control doesn't, but when searching on the internet, I didn't find...
1
by: avf | last post by:
hi all. in my code i bind a few dropdownlist boxes's lists, datasource etc. i bind the Selectedvalue property, and everything is fine. then one bright day, WITHOUT ANY CHANGE TO THE DATABINDING...
0
by: clickon | last post by:
I want to use an INSERT Query as the value for the UpdateCommand property of an SQL datasource, anyone know if this will actually work ? The reason i want to do it is bacause i am taking values...
53
by: Hexman | last post by:
Hello All, I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm using some VB6 code, .Net2003 code,...
1
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hello to all, I want to know if DataBinding in asp.net 2,0 is better than to fill up the values of the controls of the following form: this.miControlTextBox.Text = valorParaControlTextbox; ...
2
by: cjard | last post by:
I ask, because I have a textbox bound to a bindingsource, which is bound to a datatable(row) The datatable is typed, and hence exports a Property called Column1 I added another property to the...
4
by: Jason Wolf | last post by:
I have an object which runs in a sperate thread, from the main thread, and while running it updates a public property. In my main form I defined databinding on the property and I would like to see...
7
by: JTC^..^ | last post by:
When i attempt to bind to the "Text" and "Value" property of a combobox on a windows form the value is reset when I leave the combobox. The comboboxes contain the correct Text and Values. I know...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.