Take the 2-minute tour ×  I have a gridview which gets populated
in the backend code. I am trying to implement paging now, but
when I am trying my way, I am getting nothing. Here is my piece
of code:  public void generateTable()     conn.ConnectionString
= connString;     SqlCommand comm = new
SqlCommand("ViewBusinessInfo", conn);     comm.CommandType =
CommandType.StoredProcedure;     comm.CommandTimeout = 2;
SqlDataReader rdr = comm.ExecuteReader();          if
(rdr.HasRows)             gvAssociation.DataSource = rdr;
gvAssociation.AllowPaging = true;
gvAssociation.PageSize = 10;             lblResult.Text = "No
businesses found.";             lblResult.Visible = true;   Can
anyone advice what am I doing wrong and I can't get the paging
in the gridview? Thx in advance, Laziale  share|improve this
question For starters, you can probably change catch to
catch(Exception ex) so you can see if you are actually getting
an exception. An empty catch block will hide your exception. – 