postback problem in ASP.NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Giulio Santorini

    #1

    postback problem in ASP.NET

    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_Sele ctedIndexChange d
    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_Sele ctedIndexChange d
    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_Sele ctedIndexChange d... I do
    not understand what's happening...

    Could someone help me?
    Thanks!
  • Stefan

    #2
    Re: postback problem in ASP.NET

    is the AutoPostBack attribute set to true?
    "Giulio Santorini" <giulio.santori ni@yahoo.it> wrote in message
    news:07b201c384 17$22400100$a00 1280a@phx.gbl.. .[color=blue]
    > 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_Sele ctedIndexChange d
    > 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_Sele ctedIndexChange d
    > 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_Sele ctedIndexChange d... I do
    > not understand what's happening...
    >
    > Could someone help me?
    > Thanks![/color]


    Comment

    Working...