title: Using SqlDataAdapter to page a SqlDataReader source
body: <p>This question seems to be common and I went through this <a href="https://stackoverflow.com/questions/8215826/gridview-control-and-paging-asp-net">answer</a> already. </p>
  
  <p>Unfortunately, my page still isn't being paged. Here's what my code looks like in C#:</p>
  
  <pre><code> SqlCommand command = new SqlCommand("(SELECT ......", Connection);
   SqlDataAdapter myAdapter = new SqlDataAdapter(command);
   DataTable dt = new DataTable();
   myAdapter.Fill(dt);
  
   command.Connection = connection;
   command.Connection.Open();
  
   GridView1.DataSource = dt;
   GridView1.DataBind();
   GridView1.AllowPaging = true;
   GridView1.PageSize = 15;
  
   command.Connection.Close();
   command.Connection.Dispose();
  </code></pre>
  
  <p>Unfortunately, when I do this, my paging doesn't show up. Am I doing something wrong?</p>
  
  <p>Thanks</p>