title: Displaying gridview with 3 columns
body: <p>I have a gallery which holds a large number of thumbnail images and I want to show 6 at a time.</p>
  
  <p>I have this working using the code below, but I can not get the images to display as 2 rows of 3 - it shows as 6 rows of 1.</p>
  
  <p>I can get the desired result by using a datalist but that stops the pageindex function from working.</p>
  
  <p>I'm sure there's an easy solution but I can't figure it out.</p>
  
  <pre><code>&lt;asp:GridView id="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="True" PageSize="6" onpageindexchanging="PageIndexChanged" PagerSettings-Mode="NextPrevious" PagerSettings-NextPageText="Next"  PagerSettings-PreviousPageText="Previous"&gt;
      &lt;Columns&gt;
          &lt;asp:TemplateField&gt;
              &lt;itemtemplate&gt;
                  &lt;asp:Image ID="Image2" runat="server" ImageUrl='&lt;%# Eval("userID", "/imageUpload/Handler.ashx?userID={0}&amp;image=2")%&gt;' &gt;&lt;/asp:Image&gt;
              &lt;/itemtemplate&gt;
          &lt;/asp:TemplateField&gt;
      &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>