title: Paging/Sorting is not working inside <asp:UpdatePanel
body: <p>i am using LinqDataSource and a gridview control and my paging/sorting works fine but when i add <code>&lt;asp:UpdatePanel</code> than its not working, below is my .aspx page and i am not sure what i am missing...</p>
  
  <pre><code>&lt;%@ Page Language="C#" MasterPageFile="~/MasterPage/MAIN.Master" AutoEventWireup="true"  CodeBehind="ContPage.aspx.cs" Inherits="ContPage" %&gt;      
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="cphMaster" runat="server"&gt;     
      &lt;div class="contentContainer"&gt;           
          &lt;asp:LinqDataSource ID="LinqDataSource1" runat="server" OnSelecting="LinqDataSource_Selecting" 
              ContextTypeName="MyDataContextDataContext" AutoPage="true" AutoSort="true"&gt; 
          &lt;/asp:LinqDataSource&gt;     
       &lt;asp:UpdatePanel ID="up_gv1" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional"&gt; 
              &lt;Triggers&gt; 
                  &lt;asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" /&gt; 
                  &lt;asp:AsyncPostBackTrigger ControlID="btnReset" EventName="Click" /&gt; 
                  &lt;asp:AsyncPostBackTrigger ControlID="ddlFilterResultBy" EventName="SelectedIndexChanged" /&gt; 
              &lt;/Triggers&gt; 
              &lt;ContentTemplate&gt;              
                  &lt;asp:GridView runat="server" ID="gv" AutoGenerateColumns="False" 
                      CssClass="gv" DataSourceID="LinqDataSource1" Width="880px" AllowPaging="true" AllowSorting="true" DataKeyNames="Id" OnRowDataBound="gvRowDataBound" PageSize="15"&gt; 
                      &lt;PagerSettings Visible="true" Position="Bottom" /&gt; 
                      &lt;EmptyDataTemplate&gt;No  Inquiries&lt;/EmptyDataTemplate&gt; 
                      &lt;Columns&gt; 
                          &lt;asp:BoundField DataField="InquiryID" Visible="false" /&gt; 
                          &lt;asp:TemplateField HeaderText="Date" SortExpression="insertDate"&gt;                                
                          &lt;/asp:TemplateField&gt; 
                          &lt;asp:TemplateField HeaderText="" SortExpression=""&gt;                               
                          &lt;/asp:TemplateField&gt; 
                          &lt;asp:TemplateField HeaderText="Subject" SortExpression="Subject"&gt; 
                              &lt;ItemTemplate&gt; 
                                  &lt;a href='Edit.aspx?InqId=&lt;%# Eval("Id") %&gt;'&gt; 
                                      &lt;%# Eval("Subject")%&gt; 
                                  &lt;/a&gt; 
                              &lt;/ItemTemplate&gt; 
                          &lt;/asp:TemplateField&gt; 
                          &lt;asp:TemplateField HeaderText="Officer" SortExpression="Name"&gt; 
                              &lt;ItemTemplate&gt; 
                                  &lt;asp:Label ID="lblOfficer" runat="server" Text='&lt;%# Eval("Name")%&gt;'&gt;&lt;/asp:Label&gt;    
                              &lt;/ItemTemplate&gt; 
                          &lt;/asp:TemplateField&gt;                            
                          &lt;asp:TemplateField HeaderText="Status" SortExpression="ReporterInquiryStatusDesc"&gt; 
                              &lt;ItemTemplate&gt; 
                                  &lt;asp:DropDownList ID="ddStatus" runat="server" DataSourceID="ObjectDataSource1" DataTextField="Name" AppendDataBoundItems="true" DataValueField="Id" SelectedValue='&lt;%# Eval("StatusId")%&gt;'&gt;    
                                      &lt;asp:ListItem Text="" Value="0" /&gt; 
                                  &lt;/asp:DropDownList&gt; 
                                  &lt;asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetStatusList" TypeName="My_DAL.Status_LookupRepository" /&gt;   
                              &lt;/ItemTemplate&gt; 
                          &lt;/asp:TemplateField&gt; 
                          &lt;asp:TemplateField HeaderText="" SortExpression=""&gt; 
                              &lt;ItemTemplate&gt; 
                                  &lt;asp:Button ID="btnSaveRowStatus" runat="server" OnClick="btn_SaveRowStatus" Text="Save" /&gt;    
                              &lt;/ItemTemplate&gt; 
                          &lt;/asp:TemplateField&gt; 
                      &lt;/Columns&gt; 
                      &lt;PagerTemplate&gt; 
                          &lt;div style="float: left; margin-left: 7px; line-height: 22px;"&gt; 
                              &lt;div style="float: left;"&gt; 
                                  &lt;asp:ImageButton CommandName="Page" CommandArgument="First" ToolTip="First Page" runat="server" ID="PagerFirstButton" /&gt;    
                                  &lt;asp:ImageButton ID="PagerPrevButton" CommandName="Page" CommandArgument="Prev" ToolTip="Previous Page" runat="server"  /&gt; 
                              &lt;/div&gt; 
                              &lt;div style="float: left;"&gt; 
                                  &lt;div class="pagerNumber"&gt; 
                                      &lt;asp:LinkButton runat="server" ID="NumericPager1" CommandArgument="1" Text="1" CommandName="Page" /&gt;    
                                  &lt;/div&gt; 
                                  &lt;div class="pagerNumber"&gt; 
                                      &lt;asp:LinkButton runat="server" ID="NumericPager2" CommandArgument="2" Text="2" CommandName="Page" /&gt;    
                                  &lt;/div&gt; 
                                  &lt;div class="pagerNumber"&gt; 
                                      &lt;asp:LinkButton runat="server" ID="NumericPager3" CommandArgument="3" Text="3" CommandName="Page" /&gt;    
                                  &lt;/div&gt; 
                                  &lt;div class="pagerNumber"&gt; 
                                      &lt;asp:LinkButton runat="server" ID="NumericPager4" CommandArgument="4" Text="4" CommandName="Page" /&gt;    
                                  &lt;/div&gt; 
                                  &lt;div class="pagerNumber"&gt; 
                                      &lt;asp:LinkButton runat="server" ID="NumericPager5" CommandArgument="5" Text="5" CommandName="Page" /&gt;    
                                  &lt;/div&gt; 
                              &lt;/div&gt; 
                              &lt;div style="float: left;"&gt; 
                                  &lt;asp:ImageButton ID="PagerNextButton" CommandName="Page" CommandArgument="Next" ToolTip="Next Page" runat="server" /&gt; 
                                  &lt;asp:ImageButton ID="PagerLastButton" CommandName="Page" CommandArgument="Last" ToolTip="Last Page" runat="server" /&gt; 
                              &lt;/div&gt; 
                          &lt;/div&gt;                              
                          &lt;div class="gridCount" runat="server" id="divGridCount"&gt; 
                              &lt;b&gt;1&lt;/b&gt; Items Found &amp;nbsp;&lt;/div&gt; 
                      &lt;/PagerTemplate&gt; 
                  &lt;/asp:GridView&gt;                     
         &lt;/ContentTemplate&gt; 
      &lt;/asp:UpdatePanel&gt;   
    &lt;/div&gt; 
  &lt;/asp:Content&gt;
  </code></pre>