I am creating a website as a project and i am using ASP.NET and SQl Server 2005.
On my page i have a Textbox , a button with search command on it's click event and a gridview on which the datas will get displayed after i search a particular record from database.
Now i want that the gridview should show only 10 records on its first page and for that i also set the AllowPaging property of Gridview to True.
But when i click the page ....i get an error --"The data source does not support server-side data paging." But when i set that property to False..then all the retrieved records get populated in gridview and if the records consist of 25Rows then the gridview shows 25Rows all in same page of gridview...
Please anyone help me to sort out this problem..
Here is the code that i have done to populate the GridView
SqlConnection conP = new SqlConnection();
conP.ConnectionString = AppConfiguration.ConnectionString;
SqlCommand cmdp = new SqlCommand("select * from Details where Name like '" + TextBox1.Text + "%'", conP);
SqlDataReader drP = cmdp.ExecuteReader();
//grdParameterView.DataSource = drP;
GridView1.DataSource = drP;
I expect that my query will be solved with you all's help