title: Asp.net gridview horizontal layout
body: <p>i have a gallery in gridview that show pictures from database.</p>
  
  <p>I need to show the gridview in horizontal layout.</p>
  
  <p>Right now the pictures are organized from up to down, 
  How can i change the gridview so it will show the pictures from left to right in one row ?</p>
  
  <p>html code:</p>
  
  <pre><code>&lt;asp:GridView ID="GridView3" class="GridView1" runat="server" Width="400px" AutoGenerateColumns="False" Height="90px"
                      CellPadding="4" GridLines="Horizontal"&gt;
          &lt;Columns&gt;
              &lt;asp:ImageField DataImageUrlField="Image_path" DataImageUrlFormatString="~/Pic/{0}" HeaderText="Images"&gt;
                  &lt;ControlStyle Height="100px" Width="100px" /&gt;
              &lt;/asp:ImageField&gt;               
  
          &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>c# code:</p>
  
  <pre><code> con.Open();
  
      cmd = new SqlCommand("select image_path from tblImages", con);
      da = new SqlDataAdapter(cmd);
      dt = new DataTable();
      da.Fill(dt);
      GridView3.DataSource = dt;
      GridView3.DataBind();
  </code></pre>
  
  <p>con.Close();</p>