title: ASP simple gridview with paging
body: <p>In my aspx I have:</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
      AllowSorting="True" AutoGenerateColumns="True"&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>I have a  very simple class:</p>
  
  <pre><code>class ItemTable
  {
      public ItemTable(string mc, string dt)
      {
          this.Machinecode = mc;
          this.Datetime = dt;
      }
      string Machinecode { get; set; }
      string Datetime { get; set; }
  }
  </code></pre>
  
  <p>And in my code I have: </p>
  
  <pre><code>List&lt;ItemTable&gt; infos = new List&lt;ItemTable&gt;(); 
  //Some code for add item in infos...
  GridView1.DataSource = infos;
  GridView1.DataBind();
  </code></pre>
  
  <p>But i have this error: </p>
  
  <blockquote>
    <p>The data source for GridView with id 'GridView1' did not have any properties or attributes from which to generate columns.  Ensure that your data source has content.</p>
  </blockquote>
  
  <p>How do I fix this ?</p>