title: ASP.NET DropDownList AutoPostback Not Working - What Am I Missing?
body: <p>I am attempting to get a DropDownList to AutoPostBack via an UpdatePanel when the selected item is changed. I'm going a little stir-crazy as to why this isn't working.</p>
  
  <p>Does anyone have any quick ideas?</p>
  
  <p>ASPX page:</p>
  
  <pre><code>&lt;asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always" ChildrenAsTriggers="true" &gt;      
    &lt;ContentTemplate&gt;
      &lt;asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"  onselectedindexchanged="DropDownList1_SelectedIndexChanged"&gt;
        &lt;asp:ListItem&gt;item 1&lt;/asp:ListItem&gt;
        &lt;asp:ListItem&gt;item 2&lt;/asp:ListItem&gt;
      &lt;/asp:DropDownList&gt;
    &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  </code></pre>
  
  <p>Code-behind (I put a breakpoint on the string assignment to capture the postback):</p>
  
  <pre><code>protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
  {
    string s = "";
  } 
  </code></pre>
  
  <p><strong>Edit:</strong></p>
  
  <p><strong>OK, I have it working now. Very weird. All it took was a restart of Visual Studio. This is the kind of thing that frightens me as a developer ;) I think I've seen similar before, where VS gets "out of sync" wrt the assembly it's running.</strong></p>
  
  <p><strong>FYI I am running VS 2008 Web Developer Express.</strong></p>
  
  <p><strong>Thanks to those that answered.</strong></p>