title: add a checkbox or a radio button inside a repeater after checking a condion in code behind
body: <p>i want to add a radiobutton or checkbox dynamically for each record inside a repeater after checking a condition. depend on the condtion will decide what the control is... 
  if the condition true then all the records should be with radio button else with checkboxes. i tried to add this condition to myRpt_ItemDataBound. but i got stuck. please help me.</p>
  
  <p>.aspx code</p>
  
  <pre><code>&lt;asp:Repeater ID="myRpt" runat="server" OnItemCommand="myRpt_ItemCommand" OnItemDataBound="myRpt_ItemDataBound"&gt;
      &lt;HeaderTemplate&gt;
          &lt;table&gt;
              &lt;tr class=""&gt;
                  &lt;td&gt;
                      Name
                  &lt;/td&gt;
                  &lt;td&gt;
                      Address
                  &lt;/td&gt;
                  &lt;td&gt;
                      Age
                  &lt;/td&gt;
                  &lt;td&gt;
                      Year
                  &lt;/td&gt;
              &lt;/tr&gt;
      &lt;/HeaderTemplate&gt;
      &lt;ItemTemplate&gt;
          &lt;tr&gt;
              &lt;td&gt;
                      ** the place, I want to add the control **
                      // need  to add checkbox or radiobutton after checking the condition in code behind file
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;%#Eval("Name")%&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;%#Eval("Address")%&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;%#Eval("Age")%&gt;&amp;nbsp;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;%# Eval("Year")%&gt;&amp;nbsp;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/ItemTemplate&gt;
      &lt;FooterTemplate&gt;
          &lt;/table&gt;
      &lt;/FooterTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>in code behind file</p>
  
  <pre><code>public void BindUserData()
  {
      myRpt.DataBind();
  }
  
  protected void myRpt_ItemDataBound(object sender, RepeaterItemEventArgs e)
  {
      if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
      {
          //check for condition
          if(*******)
          {
              //should add a radio button for the record
          }
          else
          {
              //shoud add a check box for the record
          }
      }
  }
  </code></pre>