Hi,
I am trying to read the DropDownList's selectedIndex when it fires the
event
"SelectedIndexC hanged", however, the index value is always 0 no matter
what I've clicked. I just wonder what have I done wrong in my code...
This is how I populate my list at the Page_Load!!!!
Dim myCMD As SqlCommand = New SqlCommand(strS QL, cn)
Dim myReader As SqlDataReader = myCMD.ExecuteRe ader()
Dim fNextResult As Boolean = True
lstEmployee.Ite ms.Clear()
Do Until Not fNextResult
Do While myReader.Read()
If Not myReader.IsDBNu ll(0) Then
lstEmployee.Ite ms.Add(New
ListItem(myRead er.GetString(1) , myReader.GetInt 32(0)))
End If
Loop
fNextResult = myReader.NextRe sult()
Loop
myReader.Close( )
Thanks in advance. Any help will be greatly appreciated.
Wanda
I am trying to read the DropDownList's selectedIndex when it fires the
event
"SelectedIndexC hanged", however, the index value is always 0 no matter
what I've clicked. I just wonder what have I done wrong in my code...
This is how I populate my list at the Page_Load!!!!
Dim myCMD As SqlCommand = New SqlCommand(strS QL, cn)
Dim myReader As SqlDataReader = myCMD.ExecuteRe ader()
Dim fNextResult As Boolean = True
lstEmployee.Ite ms.Clear()
Do Until Not fNextResult
Do While myReader.Read()
If Not myReader.IsDBNu ll(0) Then
lstEmployee.Ite ms.Add(New
ListItem(myRead er.GetString(1) , myReader.GetInt 32(0)))
End If
Loop
fNextResult = myReader.NextRe sult()
Loop
myReader.Close( )
Thanks in advance. Any help will be greatly appreciated.
Wanda
Comment