title: Select DropDownList item inside of a Repeater control
body: <p>I have a repeater that contains a few items and among them there are a DropDownList and a Button.</p>
  
  <p>The goal here is to associate an item from the DDL with the selected repeater row.</p>
  
  <p>ASPX Code: </p>
  
  <pre><code>&lt;asp:Repeater ID="sharedPlansList" runat="server"
      onitemdatabound="sharedPlansList_ItemDataBound"
      onitemcommand="sharedPlansList_ItemCommand"&gt;
      &lt;ItemTemplate&gt;
          &lt;div&gt;
              &lt;h1&gt;&amp;middot; &lt;%# Eval("ProductName") %&gt;&lt;/h1&gt;
              &lt;div&gt;
              Associer le domaine : 
              &lt;asp:DropDownList runat="server" ID="domainList" /&gt;
              &lt;asp:Button ID="associateDomaine" Text="Associer" runat="server"
                  CommandArgument='&lt;%# Container.DataItem %&gt;' /&gt;
              &lt;/div&gt;
              &lt;div&gt;
                  Domaines : 
                  &lt;asp:BulletedList runat="server" ID="sharedPlanDomains" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>The problem:</p>
  
  <p>When I click the button I have each time an Invalid Postback or Callback exception ( Invalid postback or callback argument.  Event validation is enabled using  in configuration or &lt;%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. ). But everything seems really standard without anything really exotic. I do not add anything or controls by javascript either.</p>
  
  <p>I have seen solutions where you could put <code>&lt;pages enableEventValidation="false" /&gt;</code> in the <code>web.config</code> but I am not sure it's a good solution since I want to make sure to keep the asp.net built-in security model. </p>
  
  <p>Does any work-around exist?</p>