asp.net gridview paging issue when rebinding it for a search result
<p>I have a grid view and I bind it on first page load , I have some searching optionst on the same page , when search button is clicked I query the seaarch and i rebind the gridview with the new datasource comming out of search result , the problem is after rebinding the gridview I have paging problems which I don't have them in the first pageload data binding ! could anyone tell me why is that ?!</p>

<p>Here is my Page_Load coe :</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
{
    DisableChaching();
    string val = Convert.ToString(Session["AccessLevel"]);
    if (Request.Cookies["UserName"] == null)
    {
        if (Session["UserName"] == null)
        {
            Response.Redirect("~/Default.aspx");
        }
        else if (val   == "2")
        {
            Response.Redirect("~/Default.aspx");
        }
    }
    else if (val == "2")
    {
        Response.Redirect("~/Default.aspx");
    }
    if (!IsPostBack)
    {
        LoadControls();
        BindGrid();
    }
}
</code></pre>

<p>My GV_PageIndexChanging :</p>

<pre><code>protected void GV_PageIndexChanging(object sender, GridViewPageEventArgs e)
{

    GV.PageIndex = e.NewPageIndex;
    BindGrid();
    PageStatus(Status.None);
}
</code></pre>

<p>my btnSearch_Click :</p>

<pre><code> protected void btnSearch_Click(object sender, ImageClickEventArgs e)
 {
query = new CommonQueries();
       GV.DataSource = query.getBooksByGroupIDSubGroupID(DrpGroup.SelectedItem.Value,DrpSubGroup.SelectedItem.Value);
     GV.DataBind();
 }
</code></pre>

<p>And in CommonQueries Class I have this query wich I used befor :</p>

<pre><code>    public List&lt;Book&gt; getBooksByGroupIDSubGroupID(string GroupID, string SubGroupID)
{
    db = new BookMarketDataContext();
    List&lt;Book&gt; list = new List&lt;Book&gt;();
    list = (from b in db.Books where b.GroupID.ToString() == GroupID &amp;&amp; b.SubGroupID.ToString() == SubGroupID  orderby b.Name select b).ToList();
    return list;
}
</code></pre>

<p>TO BE MORE SPECIFIC : On my Page loads I don't have any problem with gridview page changing 
BUT after clicking the search button "btnSearch" and rebinding the gridview , if search results are enough to cause the gridview to have pagenumbers , and when I click one of those page numbers I get wrong results from the previous page_Load ! </p>
