DropDownList Problem

Discussion in 'ASP .Net Web Controls' started by Roshawn, Sep 5, 2004.

  1. Roshawn

    Roshawn Guest

    Hi,

    I have a DDL server control on my web form. I'm having difficulty trying to
    fire the OnSelectedIndexChanged event. I've specified a procedure to handle
    the event. Whenever I changed the selected index of the DDL server control,
    the event doesn't fire at all. Below are the settings for the DDL server
    control:

    <asp:dropdownlist autopostback="true" id="Dlist" runat="server"
    onselectedindexchanged="Selection_Changed" />

    Here is the code for the procedure to handle the event:

    Sub Selection_Changed(Byval s as Object, Byval e as EventArgs) Handles
    Dlist.SelectedIndexChanged
    Me.ViewState("page") = Me.Dlist.SelectedItem.Value
    Call GetData()
    End Sub

    What I want to do is fire the event everytime there is a change in the DDL.
    In other words, I'd like the page to be posted back to the server
    immediately when there is a selection change in the DDL. As it stands,
    nothing happens when I select a new value in the DDL.

    Can anyone help me with this problem?

    Thanks,
    Roshawn
     
    Roshawn, Sep 5, 2004
    #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. mr2_93
    Replies:
    1
    Views:
    3,662
    mr2_93
    Oct 2, 2005
  2. tshad
    Replies:
    8
    Views:
    2,260
    tshad
    Oct 19, 2005
  3. =?Utf-8?B?SnVhbmpv?=

    GridView: Filtr DropDownList from another DropDownList

    =?Utf-8?B?SnVhbmpv?=, Dec 23, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,894
    =?Utf-8?B?SnVhbmpv?=
    Dec 23, 2005
  4. =?Utf-8?B?SnVhbmpv?=

    GridView: Filter DropDownList for another DropDownList

    =?Utf-8?B?SnVhbmpv?=, Dec 29, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,336
    =?Utf-8?B?SnVhbmpv?=
    Dec 29, 2005
  5. keithb
    Replies:
    1
    Views:
    12,162
    shauns1
    Nov 1, 2006
Loading...

Share This Page