hi all...
i have a dropdownlist inside a page, i fill it in this way:
Code:
Dim Db As New OleDb.OleDbConnection
If Not OpenDatabase(Db) Then
Response.Redirect("Errores.aspx", True)
End If
Dim DbCom As New OleDb.OleDbCommand
DbCom.CommandText = "Select * FROM dependencias"
DbCom.Connection = Db
Dim DbRead As OleDb.OleDbDataReader = DbCom.ExecuteReader
DdlDependencias.DataSource = DbRead
DdlDependencias.DataTextField = "Nombre"
DdlDependencias.DataValueField = "Codigo"
DdlDependencias.DataBind()
this code is in the page load.
after that i have and execute buttom to get the new value and redirect to a new page, but the combo always return the first value.. (not the select one, the first loaded in the combo).
anyone knows what im doing wrong??
thanks in advance...
also, how can i keep the data inside the combo between postbacks?? (so i dont have to fill it everytime the user make a selection??)
HTH
Gonzalo