473,385 Members | 1,465 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,385 software developers and data experts.

binding to a dropdown control

I would like to bind a list of items to a drop down control and then
bind the selectedvalue to a row from a different table. Is it possible
to do this with just databinding? I can populate the drop down ok, its
binding the selected value that causes problems.

For example say you had a list of states in the tblstates table. You
load these into the dropdown. And then you want to select the correct
state from the proper record in the tblContacts table.

Currently I would have to populate the control with a databind and
then manually select the proper state.

Thanks,
Mike
Nov 17 '05 #1
0 1022

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

Similar topics

4
by: SimonH | last post by:
Hi everyone, If anyone can help me with this I would be really really greatful. I have a custom object that I can't change. Two of the properties (hair colour and eye colour) are of type...
4
by: Brian Conway | last post by:
I need some help on binding a datareader to a dropdown box. I have included the code for the dropdown below. It builds with no errors, but returns no results. Any help would be appreciated. ...
2
by: DotNetJunkies User | last post by:
hi,, im trying to work out what code is needed for the below problem about databinding a dropdown list and having actual datalist items as value "0" ie 'please select' can anyone tell me how to...
1
by: Andrea Williams | last post by:
I'm trying to bind to a Template Item that I created and fill the dropdown with a value from the datagrid DataSet. However, if the value is "", then I want to Insert a "" option to the list. I'm...
9
by: Timm | last post by:
I have an ASP.NET 2.0 page with two DropDownLists. I am using declarative data binding wherever possible and trying to minimize the use of code. The list of values in DropDownList DDL2 should be...
0
by: JSantora | last post by:
Essentially, InsertAT is broken! For the past couple of hours, I've been getting this "Parameter name: '-2147483550' is not a valid value for 'index'." error. Apparently, its caused by having...
0
by: muthu | last post by:
Hi guys, Iam using a repeator control in my page.In wich i have dropdown list as the last column.I have a label in the first column.Now i have binded a datable to the repeator in the page load...
6
by: Ethan V | last post by:
I have a few options regarding populating the state combo box 1. On page load, get the 50 states from the database 2. On application start, get the 50 states from the database and cache them in...
0
by: =?Utf-8?B?TWlrZSBNaWxpYW4=?= | last post by:
I have a dropdownlist control in a formview and I am trying to enable 2 way databinding. Only, the option is not available. I look at the "Edit Databinding" option of another DDL control in the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.