S
ssims
For some reason my databound DropDownList will not populate. I've
tried a variety of things...here's the latest.
- I pulled a DropDownList on to the page.
- Then I pulled a SqlDataAdapter and set the select query to "SELECT *
FROM Items".
- I chose Generate DataSet... from the SqlDataAdapter's properties.
- I set the DataSource, DataMember, DataTextField, and DataValueField
properties in the Properties window.
- Then I put DropDownList1.DataBind() in the Page_Load event.
The DropDownList is empty, but if I go to the SqlDataAdapter and chose
"Preview Data" it shows the data properly.
I've also tried putting sqlDataAdapter1.Fill(DataSet1,"Items") in the
Page_Load event prior to the DropDownList1.DataBind() code.
Any help would be greatly appreciated. Thanks.
-Sean
tried a variety of things...here's the latest.
- I pulled a DropDownList on to the page.
- Then I pulled a SqlDataAdapter and set the select query to "SELECT *
FROM Items".
- I chose Generate DataSet... from the SqlDataAdapter's properties.
- I set the DataSource, DataMember, DataTextField, and DataValueField
properties in the Properties window.
- Then I put DropDownList1.DataBind() in the Page_Load event.
The DropDownList is empty, but if I go to the SqlDataAdapter and chose
"Preview Data" it shows the data properly.
I've also tried putting sqlDataAdapter1.Fill(DataSet1,"Items") in the
Page_Load event prior to the DropDownList1.DataBind() code.
Any help would be greatly appreciated. Thanks.
-Sean