Click here to Skip to main content
13,089,209 members (68,557 online)
Click here to Skip to main content


107 bookmarked
Posted 29 Oct 2010

Advanced ASPX GridView Pagination and Data Entities

, 14 Feb 2013
ASP.NET based software system skeleton that uses the ASPX GridView control and advanced pagination for displaying a list of data entities loaded from the database, and the ASP.NET AJAX ModalPopupExtender control for creating new entities or for editing entities from the grid.
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="Ra.GridView.Web.SiteMaster" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xml:lang="en">
<head runat="server">
    <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder ID="HeadContent" runat="server">
<script type="text/javascript">

    function ResizeWindow() {
        var h1 = window.document.documentElement.clientHeight - 194;
        if (h1 > {
   = h1;

    window.onload = function () { ResizeWindow(); }
    window.onresize = function () { ResizeWindow(); }

    <form runat="server">
    <asp:ScriptManager ID="_mainScriptManager" runat="server">
    <div class="page">
        <div class="header">
                <table width="100%" cellpadding="0" cellspacing="0">
                        <td align="left" style="width: 50px;">
                            <asp:Image ID="_titleImage" runat="server" ImageUrl="~/Images/Header.png" />
                        <td align="left" class="headerText">
                            <asp:Literal ID="_titleLiteral" runat="server" Text="Ra-GridView" />
            <div class="clear hideSkiplink">
                <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false"
                    IncludeStyleBlock="false" Orientation="Horizontal">
                        <asp:MenuItem NavigateUrl="~/ContactListPage.aspx" Text="Home" />
                        <asp:MenuItem NavigateUrl="~/About.aspx" Text="About" />
        <asp:UpdatePanel ID="_mainUpdatePanel" runat="server" UpdateMode="Conditional" RenderMode="Inline">
                <div class="messageHeader">
                    <asp:Label ID="_errorLabel" runat="server" Text="" ForeColor="#FF3300"></asp:Label>
                <div class="upperContent">
                    <asp:ContentPlaceHolder ID="UpperContent" runat="server" />
                <div class="main">
                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;">
                            <td valign="top">
                                <div id="_tdMainDiv">
                                    <asp:ContentPlaceHolder ID="MainContent" runat="server" />
        <div class="clear">
    <div class="footer">

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Raul Iloc
Program Manager
Romania Romania
I am Project Manager with about 20 years working experience in software development and about 15 years as Software Project Manager and Architect.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170813.1 | Last Updated 15 Feb 2013
Article Copyright 2010 by Raul Iloc
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid