I have some basic c# code which connects to a database and prints out all rows returned i.e:
using (connection = new SqlConnection(ConfigurationManager.AppSettings["connString"]))
{
using (command = new SqlCommand("select * from table1", connection))
{
connection.Open();
using (reader = command.ExecuteReader())
{
while (reader.Read())
{
Div1.InnerHtml += reader["col1"].ToString() + "<br />";
}
}
}
}
How do I add pagination to this?