J
John
Hi all:
I have a web form with a drop-down listbox on it. If I populate the
drop-down using the forms designer, all is well. However, if I write code to
populate the drop-down in the "page load" method, if I then put code in the
command button
"Click" method, I do not get the right value out of the box using
drpSubject.SelectedItem.Value.ToString()
for some reason, it just selects the first item in the drop down.
Anyone know what is going on here? It almost seems like the page reloads
before the value is pulled from the drop-down, so on reload the drop-down
repopulates, and the selected item is the first one...
TIA for any and all help.
John.
I have a web form with a drop-down listbox on it. If I populate the
drop-down using the forms designer, all is well. However, if I write code to
populate the drop-down in the "page load" method, if I then put code in the
command button
"Click" method, I do not get the right value out of the box using
drpSubject.SelectedItem.Value.ToString()
for some reason, it just selects the first item in the drop down.
Anyone know what is going on here? It almost seems like the page reloads
before the value is pulled from the drop-down, so on reload the drop-down
repopulates, and the selected item is the first one...
TIA for any and all help.
John.