postback problem in ASP.NET

  • Thread starter Thread starter Giulio Santorini
  • Start date Start date
G

Giulio Santorini

I've got three controls:
a drop down list (ddlClienti)
two listo boxes
all of them have got
autopostback = true

when I select a value from the DDL i fill the list box
then when I select a value from the first listbox I fill
the second list box

I've put some code con the:
ddlClienti_SelectedIndexChanged
to fill the first listbox that catch the selected value:
this.ddlClienti.SelectedValue
and load the values to fill the first listbox. it works
fine.

When I try to do the same with the first listbox
(lbCantieri) I've got problems.
The first time I enter in the
lbCantieri_SelectedIndexChanged
but the
this.lbCantieri.SelectedValue;
always is the first value, even if I select another one.

the second time I select a value from lbCantieri it even
do not enter in lbCantieri_SelectedIndexChanged... I do
not understand what's happening...

Could someone help me?
Thanks!
 
Back
Top