DropdownList (1 Viewer)

accessman2

Registered User.
Local time
Yesterday, 18:32
Joined
Sep 15, 2005
Messages
335
Hi,

In MS Access, I can create the dropdownlist,
recordsource = select company,id from vendor
columncount = 1
it only display company values.
when the user select the value from the dropdownlist, we can populate id value on next textbox using dropdowlist1.column(1).

Does ASP.NET do that?
 

Kodo

"The Shoe"
Local time
Yesterday, 21:32
Joined
Jan 20, 2004
Messages
707
It's similar. You see you can bind any IEnumerable object to a listbox.. DataSets, DataTables, List (of [Object]), Arrays etc.. so you might have something

ddlDropDownList1.DataSource=[IENumerable DataSource]
ddlDropDownList1.DataBind()

that would bind the data provided you were using a dataset object

then on postback, you would do something like

TextBox1.Text=ddlDropDownList1.SelectedValue

that's basic idea.
 

Users who are viewing this thread

Top Bottom