 |
|
| .NET DotNet Forum Index » VB.NET Forum (Visual Basic .NET) » Working with data adapter/binding source at runtime |
|
Page 1 of 1 |
|
| Author |
Message |
| Guest |
Posted: Sun Apr 16, 2006 6:27 pm |
|
|
|
|
I have three fields in a database, city, state, zip. I can bind each
one of these to its own label with no problem. What I want to do is
combine all three fields into one string and bind it to one label. I
was thinking I could bind each to a hidden label, then combine them at
runtime and set it to another visible label, but I was wondering if
there was an easier way to code it.
Thanks,
Chris |
|
|
| Back to top |
|
|
|
| +Vice |
Posted: Sun Apr 16, 2006 9:55 pm |
|
|
|
Guest
|
In your query combine them into 1 variable then bind that variable. Voila!
:)
<nyk52687@gmail.com> wrote in message
news:1145233621.326827.87460@i39g2000cwa.googlegroups.com...
Quote: I have three fields in a database, city, state, zip. I can bind each
one of these to its own label with no problem. What I want to do is
combine all three fields into one string and bind it to one label. I
was thinking I could bind each to a hidden label, then combine them at
runtime and set it to another visible label, but I was wondering if
there was an easier way to code it.
Thanks,
Chris
|
|
|
| Back to top |
|
|
|
| Cor Ligthert [MVP] |
Posted: Sun Apr 16, 2006 11:52 pm |
|
|
|
Guest
|
Chris,
You can simple add a column to your table and use than the string
concatination.
Have a look at our website. This is with a datasource, but the main is about
the concationation.
http://www.vb-tips.com/default.aspx?ID=e8fee3e3-3ca7-4bb0-81dc-f0b560f43e7c
I hope this helps,
Cor
<nyk52687@gmail.com> schreef in bericht
news:1145233621.326827.87460@i39g2000cwa.googlegroups.com...
Quote: I have three fields in a database, city, state, zip. I can bind each
one of these to its own label with no problem. What I want to do is
combine all three fields into one string and bind it to one label. I
was thinking I could bind each to a hidden label, then combine them at
runtime and set it to another visible label, but I was wondering if
there was an easier way to code it.
Thanks,
Chris
|
|
|
| Back to top |
|
|
|
|
|
All times are GMT - 5 Hours
The time now is Wed Nov 25, 2009 11:34 pm
|
|