Nate Pet
Nate Pet

Reputation: 46222

asp.net dropdown list SelectedIndexChanged not firing

We have the following code:

      <asp:DropDownList id="ddlIndustry" OnSelectedIndexChanged="ddlIndustry_SelectedIndexChanged" runat="server">
        <asp:ListItem Value="0">Please Select</asp:ListItem>
        <asp:ListItem Value="1">Healthcare</asp:ListItem>
        <asp:ListItem Value="2">Hospitality</asp:ListItem>
      </asp:DropDownList>

I then have

protected void ddlIndustry_SelectedIndexChanged(object sender, EventArgs e)
{        

}

If I put a breakpoint at protected void ddlIndustry_SelectedIndexChanged it never goes there.

Upvotes: 0

Views: 183

Answers (1)

Nick Rolando
Nick Rolando

Reputation: 26167

Try adding the AutoPostBack="True" attribute to your DDL.

Upvotes: 2

Related Questions