title: Paging for Gridview doesn't work correct
body: <p>I have a search page. In list the search results are displayed.</p>
  
  <p>When I select another page from page numbers, the search result is disappeared and show the list like the page is refreshed.   What should I do? I tried OnSelectedIndexChanged and OnSelectedIndexChanging. And didn't work. Thank you.</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" 
                      CellPadding="4" DataSourceID="ahsun" ForeColor="#333333" GridLines="None" Width="100%"
                      DataKeyNames="SICIL_NO" OnSelectedIndexChanged="LinkButton1_Click" CssClass="icerik" o &gt;
                      &lt;FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White"  /&gt;
                      &lt;Columns&gt;
                          &lt;asp:TemplateField ShowHeader="False"&gt;
                              &lt;ItemTemplate&gt;
                                  &lt;asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Select"
                                      CssClass="hover" Text="Seç"&gt;&lt;/asp:LinkButton&gt;
                              &lt;/ItemTemplate&gt;
                          &lt;/asp:TemplateField&gt;
  &lt;asp:TemplateField HeaderText="Adı" SortExpression="ADI"&gt;
                              &lt;ItemTemplate&gt;
                                  &lt;asp:LinkButton ID="LinkButton3" runat="server" Text='&lt;%# Bind("ADI") %&gt;' CausesValidation="False"
                                      CommandName="Select" CssClass="hover"&gt;&lt;/asp:LinkButton&gt;
                              &lt;/ItemTemplate&gt;
                          &lt;/asp:TemplateField&gt;
                          &lt;asp:TemplateField HeaderText="Soyadı" SortExpression="SOYADI"&gt;
                              &lt;ItemTemplate&gt;
                                  &lt;asp:LinkButton ID="LinkButton4" runat="server" Text='&lt;%# Bind("SOYADI") %&gt;' CausesValidation="False"
                                      CommandName="Select" CssClass="hover"&gt;&lt;/asp:LinkButton&gt;
                              &lt;/ItemTemplate&gt;
                          &lt;/asp:TemplateField&gt;
                          &lt;asp:TemplateField HeaderText="Birimi" SortExpression="BIRIMI"&gt;
                              &lt;ItemTemplate&gt;
                                  &lt;asp:LinkButton ID="LinkButton5" runat="server" Text='&lt;%# Bind("BIRIMI") %&gt;' CausesValidation="False"
                                      CommandName="Select" CssClass="hover"&gt;&lt;/asp:LinkButton&gt;
                              &lt;/ItemTemplate&gt;
                          &lt;/asp:TemplateField&gt;
                          &lt;asp:TemplateField HeaderText="Görevi" SortExpression="GOREVI"&gt;
                              &lt;ItemTemplate&gt;
                                  &lt;asp:LinkButton ID="LinkButton6" runat="server" Text='&lt;%# Bind("GOREVI") %&gt;' CausesValidation="False"
                                      CommandName="Select" CssClass="hover"&gt;&lt;/asp:LinkButton&gt;
                              &lt;/ItemTemplate&gt;
                          &lt;/asp:TemplateField&gt;
  
                      &lt;/Columns&gt;
                      &lt;RowStyle BackColor="#EFF3FB" HorizontalAlign="Left" /&gt;
                      &lt;EditRowStyle BackColor="#2461BF" /&gt;
                      &lt;SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /&gt;
                      &lt;PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /&gt;
                      &lt;HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" /&gt;
                      &lt;AlternatingRowStyle BackColor="White" /&gt;
                  &lt;/asp:GridView&gt;
                  &lt;asp:SqlDataSource ID="ahsun" runat="server" ConnectionString="&lt;%$ ConnectionStrings:oraLiveConnectionString %&gt;"
                      ProviderName="&lt;%$ ConnectionStrings:oraLiveConnectionString.ProviderName %&gt;"
                      SelectCommand="select  SICIL_NO, ADI, SOYADI, BIRIMI ,GOREVI,PERSON_ID from xxah_hr_calisanlar WHERE SICIL_NO &lt;&gt; '01470' "&gt;&lt;/asp:SqlDataSource&gt;
                  &lt;br /&gt;
                  &lt;asp:DetailsView ID="DetailsView1" runat="server" CellPadding="4" DataKeyNames="SICIL_NO"
                      DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" Height="50px"
                      Width="100%" CaptionAlign="Left" AutoGenerateRows="False" CssClass="icerik"&gt;
                      &lt;FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /&gt;
                      &lt;CommandRowStyle BackColor="#D1DDF1" Font-Bold="True" /&gt;
                      &lt;EditRowStyle BackColor="#2461BF" /&gt;
                      &lt;RowStyle BackColor="#EFF3FB" HorizontalAlign="Left" Width="75%" /&gt;
                      &lt;PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /&gt;
                      &lt;FieldHeaderStyle BackColor="#DEE8F5" Font-Bold="True" Width="25%" /&gt;
                      &lt;HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Left"
                          Width="25%" /&gt;
                      &lt;AlternatingRowStyle BackColor="White" /&gt;
                      &lt;Fields&gt;
  &lt;asp:BoundField DataField="ADI" HeaderText="Adı" SortExpression="ADI" /&gt;
                          &lt;asp:BoundField DataField="SOYADI" HeaderText="Soyadı" SortExpression="SOYADI" /&gt;
  &lt;asp:BoundField DataField="BIRIMI" HeaderText="Birimi" SortExpression="BIRIMI" /&gt;
                          &lt;asp:BoundField DataField="GOREVI" HeaderText="G&amp;#246;revi" SortExpression="GOREVI" /&gt;
  &lt;/Fields&gt;
                  &lt;/asp:DetailsView&gt;
  
  &lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="&lt;%$ ConnectionStrings:oraLiveConnectionString %&gt;" EnableCaching="True"
                      ProviderName="&lt;%$ ConnectionStrings:oraLiveConnectionString.ProviderName %&gt;"
                      SelectCommand="select c.* from TABLE c where c.SICIL_NO=:sicil" &gt;
                      &lt;SelectParameters&gt;
                          &lt;asp:ControlParameter ControlID="GridView1" Name="sicil" PropertyName="SelectedValue" /&gt;
                      &lt;/SelectParameters&gt;
                  &lt;/asp:SqlDataSource&gt;
  </code></pre>