Tuesday, February 08, 2005 2:25 AM
I've been playing with VS.Net 2005 Beta 1 since December 2004 and here is a sample code snippet:
private void BindControl(int pageIndex)
{
ConnectionStringSettingsCollection cssc = ConfigurationSettings.ConnectionStrings;
string connectionstring = cssc["Main"].ConnectionString;
string sql = "select * from Customers"; // Using Northwind Database
SqlConnection conn = new SqlConnection(connectionstring);
SqlCommand cmd = new SqlCommand(sql, conn);
conn.Open();
SqlDataReader dr = cmd.ExecutePageReader(CommandBehavior.CloseConnection, pageIndex, 5);
gvList.DataSource = dr;
gvList.DataBind();
}
Its a very nice feature but I read in some blogs that Microsoft will not support this feature in their release of Whidbey. Hope its not true.