Click here to Skip to main content
12,508,992 members (53,722 online)
Click here to Skip to main content

Stats

146K views
11.3K downloads
108 bookmarked
Posted

Advanced ASPX GridView Pagination and Data Entities

, 14 Feb 2013 CPOL
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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
    <title></title>
    <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder ID="HeadContent" runat="server">
    </asp:ContentPlaceHolder>
</head>
<script type="text/javascript">

    function ResizeWindow() {
        var h1 = window.document.documentElement.clientHeight - 194;
        //
        if (h1 > _tdMainDiv.style.height) {
            _tdMainDiv.style.height = h1;
        }
    }

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

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

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.

License

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

Share

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...

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