Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 21st, 2010, 12:18 AM
Authorized User
 
Join Date: Mar 2010
Posts: 65
Thanks: 6
Thanked 0 Times in 0 Posts
Default creating Paging for ASP.net 3.5?

Can anybody help how to create custom pager control for the Table Control i have in my project?

eg: i just have 100 sample records. i want to create paging, around 10 per page. I know i cannot use Data pager because i have a ASP.net Table Control which is not Data bound control.

My code is:

protected void Page_Load(object sender, EventArgs e)
{
for (int i = 0; i < 100; i++)
{
TableRow r = new TableRow();
TableCell c = new TableCell();
c.Text = "Hello World " + i;
r.Cells.Add(c);
Mytable.Rows.Add(r); //Mytable is the asp table control in design view.
}
}

Can somebody please help. iam working on this for a long time. still cudn't find a solution.
 
Old April 21st, 2010, 09:14 AM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Well, why don't you use a data-bound control then?
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
 
Old April 21st, 2010, 12:32 PM
Authorized User
 
Join Date: Mar 2010
Posts: 65
Thanks: 6
Thanked 0 Times in 0 Posts
Default

No i have almost completed my project. Data bound is not flexible for my project. so i created ASP Table Control which has dynamic records.

I just want a paging system for my records. Can you suggest me?





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add Paging for ASP.net Web Form? Gayathri79 ASP.NET 3.5 Basics 0 April 20th, 2010 12:39 AM
ASP.net Crystal Report - While Paging First/Last/First ordering (ASC) Break. Vineet Dubey Crystal Reports 0 January 21st, 2010 08:46 AM
Creating ASP.NET Application in Visual Studio.NET Maxood ASP.NET 1.0 and 1.1 Basics 1 March 8th, 2004 01:56 PM
paging asp.net msrnivas .NET Web Services 1 March 1st, 2004 05:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.