title: Databinding on a property of a UserControl in DetailsView
body: <p>I have developped a usercontrol, but I can't seem to find how to databind on a property of the usercontrol in a detailsview.</p>
  
  <p>The property is defined this way:</p>
  
  <pre><code>&lt;Bindable(True, BindingDirection.TwoWay)&gt;
  Public Property Value As String
      Get
          Return combobox.SelectedValue
      End Get
      Set(value As String)
          combobox.SelectedValue = value
      End Set
  End Property
  </code></pre>
  
  <p>My databinding in my details view is done this way:</p>
  
  <pre><code>&lt;myctls:DropDown runat="server" 
                   ID="ctlSupplier" 
                   Value='&lt;%#Bind("supplier_id") %&gt;' /&gt;
  </code></pre>
  
  <p>Whenever I try to Databind, I get the following exception:</p>
  
  <blockquote>
    <p>Databinding methods such as Eval(),
    XPath(), and Bind() can only be used
    in the context of a databound control.</p>
  </blockquote>
  
  <p>Anyone got any ideas of how to make it possible to databind on a property of a usercontrol ?</p>
  
  <p>*<em>Edit 1: Added DetailsViewCode and object datasource *</em></p>
  
  <pre><code>&lt;asp:DetailsView runat="server" ID="dvMain" DataSourceID="odsReception" AutoGenerateRows="false" GridLines="None" DefaultMode="Edit"&gt;
    &lt;Fields&gt;  
       &lt;asp:TemplateField HeaderText="Supplier"&gt;
         &lt;ItemTemplate&gt;
           &lt;myctls:DropDown runat="server" ID="ctlSupplier" Width="255" Value='&lt;%#Bind("supplier_id") %&gt;' /&gt;                                                                                                                    
         &lt;/ItemTemplate&gt;
       &lt;/asp:TemplateField&gt;
  
       [... bunch of fields ...]
     &lt;/Fields&gt;
  &lt;/asp:DetailsView&gt;
  
  &lt;asp:ObjectDataSource runat="server" ID="odsReception" DeleteMethod="Delete" 
          InsertMethod="Insert" SelectMethod="Select" 
          TypeName="DataAccess.Reception" 
          UpdateMethod="Update"&gt;
  
      &lt;SelectParameters&gt;
         [... Bunch of parameters ...]
      &lt;/SelectParameters&gt;
  
      [... Parameters for other methods ...]
  &lt;/asp:ObjectDataSource&gt;
  </code></pre>