Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Nathan Sokalski #1
Combining 2 Fields Using ListBox.DataTextField
I have a ListBox control which I am using with databinding. However, the
text that I want to be displayed is a combination of two fields (in this
case, first and last names). What do I enter as the DataTextField property
to combine these two fields? Thanks.
--
Nathan Sokalski
[email]njsokalski@hotmail.com[/email]
[url]http://www.nathansokalski.com/[/url]
Nathan Sokalski Guest
-
How to: Populate listbox with fields from DB
I created a .cfm page using various queries to output a company phone list (1. lname alpha, 2. dept, 3. branch). I then have it create a .PDF using... -
combining 2 datasource fields into hyperlink column
Hello, Does someone have sample code to combine a title field and a hyperlink field to a datagrid column? For example: A link to google would... -
newbie question: combining fields
Thanks ya much! :-) "Ian.H " <ian@WINDOZEdigiserv.net> wrote in message news:20030831232735.63402517.ian@WINDOZEdigiserv.net... <Cool stuff... -
now desparate! - 1st listbox contents disappears when 2nd listbox appears?
On 23 Jun 2003 12:57:45 -0700, KathyBurke40@attbi.com (KathyB) wrote: Its been a while since you posted but I will answer anyway. The problem... -
Combining Fields
Look up 'ISNULL' and COALESCE' in BOL. "Greg" <gmanship@wvmls.com> a écrit dans le message de news: us3E67MQDHA.3192@tk2msftngp13.phx.gbl... -
Darren Kopp #2
Re: Combining 2 Fields Using ListBox.DataTextField
Well, for a general purpose answer... this should work.
list.DataTextField = string.Forma("{0}, {1}", FirstNameVar, LastNameVar);
FirstNameVar and LastNameVar are string variables or you could use really
anything, I'm sure you get the basic idea.
HTH
-Darren Kopp
[url]http://blog.secudocs.com/[/url]
"Nathan Sokalski" <njsokalski@hotmail.com> wrote in message
news:eiUZ5JY5FHA.3908@tk2msftngp13.phx.gbl...>I have a ListBox control which I am using with databinding. However, the
>text that I want to be displayed is a combination of two fields (in this
>case, first and last names). What do I enter as the DataTextField property
>to combine these two fields? Thanks.
> --
> Nathan Sokalski
> [email]njsokalski@hotmail.com[/email]
> [url]http://www.nathansokalski.com/[/url]
>
Darren Kopp Guest
-
Darren Kopp #3
Re: Combining 2 Fields Using ListBox.DataTextField
oops, string.Format.
-Darren
"Darren Kopp" <darrenkopp+newsgroup@gmail.com> wrote in message
news:ORTtybY5FHA.3976@TK2MSFTNGP15.phx.gbl...> Well, for a general purpose answer... this should work.
>
> list.DataTextField = string.Forma("{0}, {1}", FirstNameVar, LastNameVar);
>
> FirstNameVar and LastNameVar are string variables or you could use really
> anything, I'm sure you get the basic idea.
>
>
> HTH
> -Darren Kopp
> [url]http://blog.secudocs.com/[/url]
>
> "Nathan Sokalski" <njsokalski@hotmail.com> wrote in message
> news:eiUZ5JY5FHA.3908@tk2msftngp13.phx.gbl...>>>I have a ListBox control which I am using with databinding. However, the
>>text that I want to be displayed is a combination of two fields (in this
>>case, first and last names). What do I enter as the DataTextField property
>>to combine these two fields? Thanks.
>> --
>> Nathan Sokalski
>> [email]njsokalski@hotmail.com[/email]
>> [url]http://www.nathansokalski.com/[/url]
>>
>
Darren Kopp Guest
-
Patrick.O.Ige #4
Re: Combining 2 Fields Using ListBox.DataTextField
Nathan you coould do that in SQL
Hope that helps
Patrick
"Nathan Sokalski" <njsokalski@hotmail.com> wrote in message
news:eiUZ5JY5FHA.3908@tk2msftngp13.phx.gbl...> I have a ListBox control which I am using with databinding. However, the
> text that I want to be displayed is a combination of two fields (in this
> case, first and last names). What do I enter as the DataTextField property
> to combine these two fields? Thanks.
> --
> Nathan Sokalski
> [email]njsokalski@hotmail.com[/email]
> [url]http://www.nathansokalski.com/[/url]
>
>
Patrick.O.Ige Guest



Reply With Quote

