Event not firing

Discussion in 'ASP .Net' started by SirPoonga, Jan 14, 2005.

  1. SirPoonga

    SirPoonga Guest

    I have a form with several DropDowns and DataGrids. They all work the
    way they are suppose except one dropdown. When I select an option it's
    SelectedIndexChanged event is not firing. When the page refreshes the
    original (first) item is selected. I even bookmarked the event in the
    debugger to see if it runs through that code.
    In the following code the ddBoltOn dropdown box is the problem one.

    Note: Web matrix produce the majority of the code.

    <script runat="server">
    Sub ckBoltOn_CheckedChanged(sender As Object, e As EventArgs)
    End Sub

    Sub ddBoltOn_SelectedIndexChanged(sender As Object, e As EventArgs)
    End Sub

    Sub ckOther_CheckedChanged(sender As Object, e As EventArgs)
    End Sub

    Sub ddOther_SelectedIndexChanged(sender As Object, e As EventArgs)
    End Sub

    Bolt On S.C.:
    <asp:CheckBox id="ckBoltOn" runat="server" AutoPostBack="True"
    <asp:DropDownList id="ddBoltOn" runat="server"
    <asp:CheckBox id="ckOther" runat="server" AutoPostBack="True"
    <asp:DropDownList id="ddOther" runat="server"
    SirPoonga, Jan 14, 2005
    1. Advertisements

  2. SirPoonga

    Marina Guest

    Are you repopulating the dropdown in page_load maybe? So wiping out the
    selected item by repopulating the dropdown, as opposed to letting viewstate
    deal with it.
    Marina, Jan 14, 2005
    1. Advertisements

  3. SirPoonga

    SirPoonga Guest

    I was thinking that too at a point. I put a breakpoint at every spot
    ddBoltOn or ckBoltOn is refered to. None of that was executed.

    FYI, the check boxes enable and disable the dropdowns.

    This form is a product selection form. You used the various drop downs
    and datagrids to to select through the products. At the end a Bill of
    Materials for Engineering and Manufacturing will be produced to create
    that product. So the checkboxes indicate if the user wants that option
    or not. Would disabling and enabling the controls affect how the event
    is handled?

    My next step is to simplify the page with just that dropdown. See if
    it happens with just that control on the page.
    SirPoonga, Jan 14, 2005
  4. SirPoonga

    SirPoonga Guest

    Here's my Page_Load
    Sub Page_Load
    If Not Page.IsPostBack Then
    'Page initialization stuff. Will run on non Post Back
    End If
    End Sub

    A PostBack should just connect to the database, stepping through the
    code with the debugger showed this to be correct.
    SirPoonga, Jan 14, 2005
  5. SirPoonga

    SirPoonga Guest

    My Bad. It's my fault :) All the itms in the dropdown ended up
    getting the same Value. SOOOOO, it wouldn't fire the event because the
    selected item really didn't change in value.
    SirPoonga, Jan 14, 2005
  6. SirPoonga

    Fabio Guest

    I had the very same problem once - the solution? Reset IE security settings to
    default! Give it a try and let us know...

    PS: Imagine my surprise when the aspx was working with mozilla, but not IE...
    Fabio, Jan 15, 2005
    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.