Databinding and order of events

Discussion in 'ASP .Net' started by Rex the Strange, Nov 17, 2006.

  1. I'm having a problem here and am looking for the answer. I have two
    listboxes. One is a dropdown and the other is a simple list of items
    which is databound . I want to be able to allow the user to change the
    value in the dropdown which would, in turn, change the values in the

    So, I create a background routine to change the sql accordingly. Create
    routine to respond to the event of the dropdown changing values. Set
    autopostback to true. When can I change my sql statement? It seems to
    be either before the onselectedindexchanged event fires or, if on the
    databinding event of the list, it doesn't fire at all after the first

    I'm sure this is a common thing. Please, how is it done?

    Rex the Strange, Nov 17, 2006
    1. Advertisements

  2. Never mind. I just worked it out. You need to actually call the binding
    method manually from the onselectedindexchanged event handler by

    textboxname.DataBind (); (in C#)
    Rex the Strange, Nov 17, 2006
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.