title: Bind data to a repeater in runtime
body: <p>I have a problem of binding data to a repeater control in runtime, I know how to bind data in aspx but cannot figure out how to do that in runtime. I have unknown number of rows to bind and in each row I have unknown number of items, this structure is a list of lists I've assigned it to the repeater data source in code behind. But to get the format I want What should I write instead of this code in ItemDataBound event in code behind?</p>
  
  <pre><code>&lt;asp:Repeater ID="RepeaterCategories" runat="server" OnItemCreated="RepeaterCategories_ItemCreated" OnItemDataBound="R1_ItemDataBound"&gt;
  &lt;ItemTemplate&gt;
  &lt;asp:LinkButton ID="parent1Link" runat="server" ForeColor="#570000" CommandArgument='&lt;% #Eval("ParentID1") %&gt;'
  Text='&lt;% #Eval("ParentName1") %&gt;' Font-Size="Small" Font-Underline="False" Font-Bold="True"
  Font-Names="Arial" PostBackUrl='&lt;% #CategoryId(Eval("ParentID1")) %&gt;'&gt;
   &lt;/asp:LinkButton&gt;
  &amp;nbsp;
   &lt;asp:Image ID="Image3" runat="server" Width="7px" ImageUrl="~/Img/next.png" /&gt;
  &amp;nbsp;
  &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>