dependent dropdownlists

  • Thread starter Thread starter mcnews
  • Start date Start date
M

mcnews

i need an example of how to populate a top listbox via stored proc
that once an item is selected two other listboxes are populated from
stored procs. when the 2nd listbox item is selected the 3rd is
updated from stored proc.
tia,
mcnewsxp
 
There is nothing different if you do it using a stored procedure or a
dynamic procedure.

If you use a datatable than this is all you need to do.

dim dt as new datatable
using da as new SQLDataAdapter("YourSPName",TheConnectionString)
da.SelectCommand.commandType = command.SP
da.Fill(dt)
end using
YourListBox.DataSource = dt
YourListBox.DisplayMember = "YourDisplayColumn"
YourListBox.ValueMember = "YourValueColumn"

Normally is the SelectedValue then the where parameter for the next SP



"mcnews" wrote in message

i need an example of how to populate a top listbox via stored proc
that once an item is selected two other listboxes are populated from
stored procs. when the 2nd listbox item is selected the 3rd is
updated from stored proc.
tia,
mcnewsxp
 
Back
Top