Need previous value after a DropDownList ListControl.SelectedIndexChanged Event

Discussion in 'ASP .Net Web Controls' started by J055, Nov 30, 2006.

  1. J055

    J055 Guest

    Hi

    I have a DropDownList with AutoPostBack = true. When this occurs I need to
    load an ObjectDataSource control with the previous value. This is because
    the DropDownList populates another list but should not load new data until a
    Submit button is clicked.

    I'd like to change the DropDownList value in the InputParameters collection
    in the ObjectDataSource Selecting event.

    e.g.

    protected void ods_Selecting(object sender,
    ObjectDataSourceSelectingEventArgs e)
    {
    // if DropDownList selected index changed then
    e.InputParameters.Remove(key);
    e.InputParameters.Insert(0, key, oldvalue);
    }

    what's the best/cleanest way to achieve this?

    Thanks
    Andrew
    J055, Nov 30, 2006
    #1
    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. Dominic
    Replies:
    2
    Views:
    707
    Saravana
    Jul 4, 2003
  2. Robert Hanson
    Replies:
    0
    Views:
    517
    Robert Hanson
    Jul 10, 2003
  3. Henri
    Replies:
    1
    Views:
    192
    MasterGaurav
    May 20, 2005
  4. Scott Blood

    Custom ListControl OnFocus Event not working

    Scott Blood, Jul 31, 2006, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    154
    Scott Blood
    Jul 31, 2006
  5. Jay
    Replies:
    0
    Views:
    145
Loading...

Share This Page