473,506 Members | 16,994 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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/
Aug 19 '05 #1
1 1099
<%# 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/

Aug 19 '05 #2

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

Similar topics

1
991
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
1587
by: ECathell | last post by:
'------------------------------------------------------------------------------------------------ 'Label Formats...
7
2568
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
1003
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
1275
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
4595
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
1618
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
3244
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
3302
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...
0
7218
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
7103
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
7307
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,...
1
7021
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
5614
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,...
1
5035
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
1532
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
409
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.