Paging method in asp.net 4.5

Gridview

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">

                <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
                    <ProgressTemplate>
                       <h2>Haal de fucking data!</h2>
                    </ProgressTemplate>

                </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" >

        <ContentTemplate>

                <asp:GridView ID="GridView1" runat="server" CssClass="table table-striped table-hover" GridLines="None" AllowPaging="true"  SelectMethod="GetData"></asp:GridView>
        </ContentTemplate>
        <Triggers>
         <asp:AsyncPostBackTrigger ControlID="GridView1" EventName="PageIndexChanged" />
        </Triggers>
    </asp:UpdatePanel>
    
    <div>
        <h2>Dit is een stuk tekst die niet moet reloaden</h2>
    </div>
</asp:Content>

Method

        public IEnumerable GetData(int startRowIndex, int maximumRows, out int totalRowCount)
        {
            totalRowCount = Data.Count;
            return Data.Skip(startRowIndex).Take(maximumRows);
        }

{{opmerking.Naam}}:

{{opmerking.OpmerkingText}}

            

Saving your comment....

Naam is verplicht!
Email is verplicht!
Opmerking is verplicht!