473,327 Members | 2,074 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,327 software developers and data experts.

Databinding DropDownList and Label

Hi
I'm using a FormView control.

In my EditTemplate, I have bound to a DropDownList. This works fine, by
having the key in my primary table, which is looked up via the binding to my
DDL using the DataSourceID etc..

However, I want to have the value that is in the drop down list to be shown
in the Label control on my ItemTemplate. This is tricky, because the label
control does not have a DataSourceID property for me to use with the
binding.

Whats the best way to achieve this??
Should I just use the DropDownList in my ItemTemplate also, but just disable
it??

Thanks
Feb 6 '06 #1
1 2780
DWS
Might not be best way. Populate label on server in ddl selectedindex changed
event.
Good Luck Paul
DWS
"Paul Aspinall" wrote:
Hi
I'm using a FormView control.

In my EditTemplate, I have bound to a DropDownList. This works fine, by
having the key in my primary table, which is looked up via the binding to my
DDL using the DataSourceID etc..

However, I want to have the value that is in the drop down list to be shown
in the Label control on my ItemTemplate. This is tricky, because the label
control does not have a DataSourceID property for me to use with the
binding.

Whats the best way to achieve this??
Should I just use the DropDownList in my ItemTemplate also, but just disable
it??

Thanks

Feb 6 '06 #2

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

Similar topics

4
by: aroth | last post by:
I have a basic form with some dropdownlist controls that I would like to populate with items from a database. I keep getting the error "Cannot implicitly convert type...
1
by: Joe Gass | last post by:
I'd like to bind some xml to a dropdownlist <engines> <engine name="test1" id="1" /> <engine name="test2" id="2" /> </engines> If I do: ddlEngines.DataSource =...
4
by: Nathan Sokalski | last post by:
I have two databinding expressions (the first & last names from a DB) that I want to assign to the text property of a Label so that the result is LASTNAME,FIRSTNAME. At the moment, I have the...
1
by: dieter | last post by:
Two-way databinding (as described in http://dotnetjunkies.com/QuickStartv20/aspnet/doc/data/templates.aspx) works fine for me if I use it within aspx-files. However, I would like to use it my...
1
by: Paul Aspinall | last post by:
Hi I'm using a FormView control. In my EditTemplate, I have bound to a DropDownList. This works fine, by having the key in my primary table, which is looked up via the binding to my DDL using...
1
by: CorporateCoder | last post by:
Hi, I am trying to bind the selected value of a databound dropdown box in a databound gridview control to the value being displayed in the template column the dropdown box has been added to. ...
0
by: marianowic | last post by:
Hello. I`m killing my computer for 2 days and I can`y figure it out. First I will present the situation: I`m building and WWW system in VS 2005. I`m using a MaterPage ( maybe this is the problem...
1
by: Larry Bud | last post by:
Newbie here, so be gentle. I've tried writing this page a variety of ways, but can't get this to work. I have a drop down with monetary exchange rates. I have a table with a bunch of columns...
0
by: sgtmarcjones | last post by:
How do I access a dropdownlist that is nested within a Formview ItemTemplate Gridview Template? I want to see a label (lgbTimeKeep ! TextValue of ddlName dropdownlist) instead of a dropdownlist...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.