Click here to Skip to main content
13,095,004 members (81,311 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » Data » Downloads


29 bookmarked
Posted 20 Jun 2005

Generic Paging for Recordset with Next Back Navigation

, 20 Jun 2005
This article is basically about a Paging control required for project purposes. One can use this just by changing three parameters.
<%@ Page language="c#" EnableSessionState="false"  Codebehind="Paging.aspx.cs" AutoEventWireup="false"  Inherits="Paging.WebForm2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
		<LINK href="../styles/styles.css" rel="STYLESHEET" type="text/css">
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="">
		<script language="JavaScript"><!--
	function addDays(myDate,days) 
		//return new Date(myDate.getTime() + days*24*60*60*1000);
		return myDate;

	<body MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			<TABLE id="Table2" style="Z-INDEX: 101; LEFT: 96px; WIDTH: 312px; POSITION: absolute; TOP: 72px; HEIGHT: 224px"
				cellSpacing="1" cellPadding="1" width="312" border="1">
					<TD style="WIDTH: 110px"><STRONG>Total Record</STRONG></TD>
					<TD style="WIDTH: 63px"></TD>
					<TD style="WIDTH: 256px">
						<asp:DropDownList id="ddlTotalRec" runat="server" Width="216px" AutoPostBack="True">
							<asp:ListItem Value="100">Record1(100)</asp:ListItem>
							<asp:ListItem Value="200">Record2(200)</asp:ListItem>
							<asp:ListItem Value="300">Record3(300)</asp:ListItem>
							<asp:ListItem Value="400">Record4(400)</asp:ListItem>
							<asp:ListItem Value="555">Record5(555)</asp:ListItem>
							<asp:ListItem Value="0">Record(0)</asp:ListItem>
					<TD style="WIDTH: 110px"><STRONG>Records</STRONG></TD>
					<TD style="WIDTH: 63px"></TD>
					<TD style="WIDTH: 256px">
						<asp:Label id="Label1" runat="server" Width="214px" Height="40px">Label</asp:Label></TD>
					<TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</TD>
					<TD style="WIDTH: 110px; HEIGHT: 42px">&nbsp;&nbsp;
						<asp:Button id="btnFirstRec" runat="server" Text="<"></asp:Button></TD>
					<TD style="WIDTH: 63px; HEIGHT: 42px">&nbsp;&nbsp;
						<asp:Button id="btnPrev" runat="server" Text="<<"></asp:Button>
					<TD style="WIDTH: 256px; HEIGHT: 42px">
						<asp:Table id="tblPaging" runat="server" cellspacing="0" Runat="server"></asp:Table></TD>
					<TD style="HEIGHT: 42px">&nbsp;&nbsp;
						<asp:Button id="btnNext" runat="server" Text=">>"></asp:Button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<TD style="HEIGHT: 42px">&nbsp;
						<asp:Button id="btnLastRec" runat="server" Text=">"></asp:Button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
					<TD style="WIDTH: 110px"><STRONG>First</STRONG></TD>
					<TD style="WIDTH: 63px"><STRONG>Previous</STRONG></TD>
					<TD style="WIDTH: 256px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<STRONG>Pagination</STRONG></TD>
			<asp:Label id="Label3" style="Z-INDEX: 102; LEFT: 272px; POSITION: absolute; TOP: 48px" runat="server"
				Width="329px" Font-Bold="True">Paging With Intervals</asp:Label>

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

santosh poojari
Technical Lead
India India
Whatsup-->Exploring--> MVC/HTML5/Javascript & Virtualization.......!

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170813.1 | Last Updated 21 Jun 2005
Article Copyright 2005 by santosh poojari
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid