SelectedIndexChanged event doesn't fire for Listbox or DropdownList

Discussion in 'ASP .Net' started by CW, Apr 9, 2004.

  1. CW

    CW Guest

    Yes, Autopostback is true, and it doesn't make an iota of difference at all.

    HTML snippet and code (behind) snippet is as below:

    <asp:dropdownlist id="ddlLoginType" runat="server" Width="163px"
    AutoPostBack="True"></asp:dropdownlist>



    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load


    If Not Me.Page.IsPostBack Then
    Me.ddlLoginType.Items.Add("Customers")
    Me.ddlLoginType.Items.Add("Sales Rep")
    Me.ddlLoginType.Items.Add("Admin")

    End If
    End Sub



    Private Sub ddlLoginType_SelectedIndexChanged(ByVal sender As Object, ByVal
    e As System.EventArgs) Handles ddlLoginType.SelectedIndexChanged

    ....

    End sub



    I have changed the DDL to a Listbox and the same problem.
    SelectedIndexChanged event never ever fires!



    Any idea?
     
    CW, Apr 9, 2004
    #1
    1. Advertisements

  2. CW

    Chris Taylor Guest

    Chris Taylor, Apr 9, 2004
    #2
    1. Advertisements

  3. CW

    CW Guest

    I originally had the <form id="form1" runat="server"> and its associated
    <form/> tag around the outside the body tag.

    Once I place them inside the body tag, everything seemed to work.
     
    CW, Apr 9, 2004
    #3
    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.