accessman2
Registered User.
- Local time
- Yesterday, 20:55
- Joined
- Sep 15, 2005
- Messages
- 335
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim myReader As System.Data.OleDb.OleDbDataReader
OleDbConnection1.Open()
myReader = OleDbCommand1.ExecuteReader()
DataGrid1.DataSource = myReader
DataGrid1.DataBind()
DropDownList3.DataSource() = myReader
DropDownList3.DataTextField = "Name"
DropDownList3.DataValueField = "Name"
DropDownList3.DataBind()
...
End Sub
I used this codes in the Page_Load function, The datagrid1 works, but the dropdownlist doesn't work. What's wrong with it?
Dim myReader As System.Data.OleDb.OleDbDataReader
OleDbConnection1.Open()
myReader = OleDbCommand1.ExecuteReader()
DataGrid1.DataSource = myReader
DataGrid1.DataBind()
DropDownList3.DataSource() = myReader
DropDownList3.DataTextField = "Name"
DropDownList3.DataValueField = "Name"
DropDownList3.DataBind()
...
End Sub
I used this codes in the Page_Load function, The datagrid1 works, but the dropdownlist doesn't work. What's wrong with it?