Click here to Skip to main content
15,892,537 members
Articles / Web Development / ASP.NET

How to create customized Pagers for ASP.NET applications

Rate me:
Please Sign up or sign in to vote.
4.48/5 (18 votes)
29 Apr 20045 min read 96.7K   2.8K   56  
Demonstrate how to create custom pagers that can attahced to a DataGrid.
using System;

namespace WebExpertCTL.Web.UI.Pagers
{
	#region PageNumberChanged delegate & PageNumberChangedEventArgs Class 
	
	/// <summary>
	/// This class provides the event argument for a page number change event.
	/// </summary>
	public class PageNumberChangedEventArgs : EventArgs
	{
		#region Variables Declaration

		int m_OldPageNumber;
		int m_NewPageNumber;
		
		#endregion
		
		#region Constructor

		internal PageNumberChangedEventArgs(int OldPageNumber, int NewPageNumber)
		{
			m_OldPageNumber = OldPageNumber;
			m_NewPageNumber = NewPageNumber;
		}
		
		#endregion
		
		#region Properties
		
		/// <summary>
		/// Get the page number before the user changed the page
		/// </summary>
		public int OldPageNumber
		{
			get{return m_OldPageNumber;}
		}
		
		/// <summary>
		/// Get the new page number
		/// </summary>
		public int NewPageNumber
		{
			get{return m_NewPageNumber;}
		}

		#endregion
	}
	
	public delegate void PageNumberChanged(object sender, PageNumberChangedEventArgs e);
	#endregion
}

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Israel Israel
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions