title: Unnecessary drop down events fire in c#
body: <p>I have these drop downs in my application</p>
  
  <pre><code>&lt;asp:DropDownList ID="ddl1" runat="server" DataTextField="Val" DataValueField="ValID" AutoPostBack="true" OnSelectedIndexChanged="ddl1change"&gt;&lt;/asp:DropDownList&gt;
  
  &lt;asp:DropDownList ID="ddl2" runat="server" DataTextField="Val" DataValueField="ValID" AutoPostBack="true" OnSelectedIndexChanged="ddl1change"&gt;&lt;/asp:DropDownList&gt;
  
  &lt;asp:DropDownList ID="ddl3" runat="server" DataTextField="Val" DataValueField="ValID" AutoPostBack="true" OnSelectedIndexChanged="ddl1change"&gt;&lt;/asp:DropDownList&gt;
  </code></pre>
  
  <p>This is the OnSelectedIndexChanged function in the cs page</p>
  
  <pre><code> protected void ddl1change(object sender, EventArgs e)
      {
          try
          {
              DropDownList ddltemp = sender as DropDownList;
  
              if (ddltemp.SelectedItem.Text != "---Select---")
              {
                  selectedltrDropdownText = ddltemp.SelectedItem.Text;                    
                  PassFileName(selectedltrDropdownText);                    
              }           
          }
          catch (Exception ex)
          {
              _logger.Error("Failed." + ex.Message + "; Stack Trace :" + ex.StackTrace);
          }
  
      }
  </code></pre>
  
  <p>This is how I load the drop down</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
      {
           if (!IsPostBack)
           {
                 Fill();
           }
      }
  </code></pre>
  
  <p>The Fill(); Gets some types which needs to be loaded in the drop down.</p>
  
  <p>My problem:</p>
  
  <p>First step : I am changing the ddl1 everything works fine.
  Second step: I am changing the ddl2 , now the event fires for both ddl1 and ddl2. But only ddl2 needs to be fired on this case.
  I don't have any clue why ddl1 fires in this case. Can anyone tell me where I am wrong or what should I do?</p>