DropDownList and AutoPostBack

Discussion in 'ASP .Net' started by Anonymous, Feb 9, 2005.

  1. Anonymous

    Anonymous Guest

    Hello,

    I have a ddl (ddl1) which when postbacks fills
    (OnSelectedIndexChanged) a second ddl. Now other second
    ddl (ddl2) fills a third one (ddl3) when it postsback. The
    problem is now that when the second one does a postback
    then it doesnt maintain his state. Viewstate is enabled.

    Any idea?
    Anonymous, Feb 9, 2005
    #1
    1. Advertising

  2. Hi,

    Do you re-populate or clear the drop lists at all on postbacks? It's
    possible the viewstate can't keep the value of the list because the
    list of values is changing.

    My first thing to check would be the load events and especially check
    any necessary if(!Page.IsPostback) 's are in place.

    Regards,

    Peter Chadwick (MCP)
    Peter Chadwick (MCP), Feb 9, 2005
    #2
    1. Advertising

  3. Anonymous

    Anonymous Guest

    Hey,

    I am filling the first ddl only in If Not IsPostback.
    The second one is binded when the first one calls his
    SelectedIndexChanged. And the third one is binded when the
    second one calls his SelectedIndexChanged. So it should be
    ok in "theory". I dont get this. The first one maintains
    his state, but the second one doesnt. Even the third one
    can maintain his state. The third one doesnt do any
    postback and it doesnt call SelectedIndexChanged.


    >-----Original Message-----
    >Hi,
    >
    >Do you re-populate or clear the drop lists at all on

    postbacks? It's
    >possible the viewstate can't keep the value of the list

    because the
    >list of values is changing.
    >
    >My first thing to check would be the load events and

    especially check
    >any necessary if(!Page.IsPostback) 's are in place.
    >
    >Regards,
    >
    >Peter Chadwick (MCP)
    >
    >
    >.
    >
    Anonymous, Feb 9, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Null
    Replies:
    1
    Views:
    575
    S. Justin Gengo
    Aug 5, 2003
  2. George Durzi
    Replies:
    0
    Views:
    721
    George Durzi
    Aug 15, 2003
  3. S. Justin Gengo
    Replies:
    0
    Views:
    3,140
    S. Justin Gengo
    Aug 15, 2003
  4. Corey
    Replies:
    11
    Views:
    6,174
    Cor Ligthert
    Mar 20, 2005
  5. Girish

    DropDownList Control and AutoPostBack problems

    Girish, Jan 30, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    197
    Girish
    Jan 30, 2004
Loading...

Share This Page