Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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.
  #2 (permalink)  
Old April 21st, 2010, 09:14 AM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
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(); 
}
  #3 (permalink)  
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?
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 02:17 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.