title: Asp.Net DataList bind array of ImageUrls
body: <p>I am trying to make a grid of thumbnails using a datalist. I have an array of the imageurls and I want to bind them in the code behind. How would I go about do that? I want the datalist to have a max column size of 5 and add rows of thumbnails until completed.</p>
  
  <pre><code>&lt;asp:DataList ID="dlImages" runat="server" 
            RepeatColumns="5" 
            RepeatDirection="Horizontal" 
            RepeatLayout="Flow"&gt;
  
     &lt;ItemTemplate&gt;
        &lt;asp:Image ID="imgStore" runat="server" /&gt;
     &lt;/ItemTemplate&gt;
  
  &lt;/asp:DataList&gt;
  </code></pre>
  
  <p>CODEBEHIND:</p>
  
  <pre><code>protected void BindImages(string[] imageurls)
  {
      for (int i = 0; i &lt; imageurls.Length; i++)
      {
          .
          .
          .
      }
  }
  </code></pre>