Posted on: 3/16/2015 8:03:20 PM | Views : 630

hi,
 im facing an issue with the  gridview pageindex  .In my form when I give some name in textbox and clickon serach button it gets data into gridview related to that  name but it shows all the indexes 12345... but I have only some data in page 1  related to that name   if I click on page 2 3,4,... it is showing all remaining records
below is the code in searchbutton
protected void btnSearch_Click(object sender, System.EventArgs e) {if (txtlogno.Text != "") { SqlCommand cmd = new SqlCommand("SELECT l.TID,l.Course_Name,ll.Employee,ll.TDate from Training_Log l,Training_Employee_Log ll WHERE (ClientID = @ClientID) and Course_Name LIKE '%'+ @Course_Name + '%' order by TID desc ", sqlConn); cmd.Parameters.AddWithValue("@Course_Name", txtlogno.Text); cmd.Parameters.AddWithValue(&qu ...

Go to the complete details ...