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,"Dat aItem.membernam es.lname") %>'
OR
text='<%# DataBinder.Eval (Container,"Dat aItem.membernam es.fname") %>'
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********@hotm ail.com http://www.nathansokalski.com/ 1 1108
<%# DataBinder.Eval (Container,"Dat aItem.membernam es.fname") + " " +
DataBinder.Eval (Container,"Dat aItem.membernam es.lname") %>
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********@hot mail.com> wrote in message
news:OR******** ******@TK2MSFTN GP14.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,"Dat aItem.membernam es.lname") %>'
OR
text='<%# DataBinder.Eval (Container,"Dat aItem.membernam es.fname") %>'
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********@hotm ail.com http://www.nathansokalski.com/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 them to the Text property as
follows:
text='<%# DataBinder.Eval(Container,"DataItem.membernames.lname") %>'
OR
text='<%# DataBinder.Eval(Container,"DataItem.membernames.fname") %>'
|
by: ECathell |
last post by:
'------------------------------------------------------------------------------------------------
'Label Formats
'------------------------------------------------------------------------------------------------
Me.cboLabelFormat1.DataSource = mLabelFormatsCollection
Me.cboLabelFormat1.DisplayMember = "FormatName"
Me.cboLabelFormat1.DataBindings.Add(New Binding("Text", mProductCollection, "Formatname1"))
Me.cboLabelFormat2.DataSource...
|
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 any solution that works without problems.
Does anybody know where I can find an inherited DateTimePicker that supports
databinding and nulll-values? Any links, sample code etc would be really
appreciated! It can be for VB.NET 2005, in case that...
|
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 CODE, i started
getting "System.ArgumentOutOfRangeException: Specified argument was out
of the range of valid values". in the IDE i see that scewy line under
selectedvalue - "Could not find any attribute selectedvalue of
DropDownList"
|
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 from tablea and
binding them to controls, whose values i want to insert into tableb. I am
using a detailsview control to do the databinding. If the detailsview is in
edit mode then it displays the data from table A in the bound testbox
controls...
| |
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, and .Net2005 code. I'm developing in vb.net 2005.
This test sub just reads an input text file, writing out records to another text file, eliminating records that have a '99' in them (it is similar to
a CSV file).
Some of my concerns are:
|
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;
Performance with databinding is good in asp.net 2.0 ? Would you prefer:
databinding or set value to Text property of control ?
|
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 datatable by editing the partial
class, and Called it ColumnX - it simply returns "Hello World" all the
time
Then I tried to bind my textbox to it, editing the binding for .Text
from xyzBindingSource - Column1
|
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 this databinding update my form property to reflect the value of the
other components property, but it does not happen.
My binding is Databinding.Add("Text",renderEngine,"Framerate");
When the property is initially set, to minus one, the text...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |