Listbox DataBinding

  • Thread starter Thread starter J. Babe
  • Start date Start date
J

J. Babe

I am trying to bind data from a database to a DropDownListBox on an
..aspx page.

I want to display 2 fields in listbox (listbox's .DataTextField = two
fields in the database "Employee.FName" & " " & "Employee.LName" -
space in between the names)

and also have the listbox's .DataValueField = Employee.EmployeeID
field.

I tried to do this by creating a field through the SQL query used to
build a dataset, but I got the error "Dynamic SQL generation not
supported (or similiar)". I was wondering if there is another way to
display these two fields in the listbox?
 
Use a stored proc to concatenate the name fields and bind to it instead
of a SQL statement.
 
I'm actually using Access as my database, so I'm wondering if I can do
this without using a stored proc.
 
Back
Top