Well, I solve my own problem - but maybe this will keep someone else from
making the same mistake.
When I defined the values for these 2 DropDownLists, I also defined a ListItem
Dim li As ListItem
.... I defined this object as...
li = New ListItem("No Selection", 0)
....and used inserted it into each of the DropDownLists
lstSrchPeriod.Items.Insert(0, li)
lstSrchCenter.Items.Insert(0, li)
This seems to create a conflict in these objects. I fixed this problem by
creating a second ListItem object and using that to fill the second DDL, like
this...
Dim li As ListItem, li1 As ListItem
li = New ListItem("No Selection", 0)
lstSrchPeriod.Items.Insert(0, li)
li1 = New ListItem("No Selection", 0)
lstSrchCenter.Items.Insert(0, li1)
This seems like a bug to me and I will report it to MS.
Don DeVeux
"rengeek33" wrote:
I have a strange issue:
I have a dropdownlist (lstSrchPeriod) that has a SelectedValue of something
(say "12"). I use an IF statement to determine if that value is there:
If lstSrchPeriod.SelectedValue <> "0" Then
theWhere &= " AND rpt_period = '" &
lstSrchPeriod.SelectedValue & "'"
End If
...that works fine. Then I evaluate this next DropDownList...
If lstSrchCenter.SelectedValue <> "0" Then
theWhere &= " AND center_id = " & lstSrchCenter.SelectedValue
End If
...and when it evaluates the IF statement, it resets
lstSrchPeriod.SelectedValue to "0". I have stepped through it and no code is
run that would reset this. I have
no idea what is happening.
Do any of you have an idea about this?
Don DeVeux