Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 August 13th, 2004, 05:57 AM
ham ham is offline
Authorized User
 
Join Date: Aug 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default urgent reply required

hi

i want to implement paging , i m not using DataGrid instead using HTML table and datareader.

can anyone there guide me how to implement paging in this scenario

waiting for reply
 
Old August 13th, 2004, 08:10 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

A datareader doesn't implement an ICollection interface so you can't use it. You have to use a DataTable.
 
Old August 13th, 2004, 02:25 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I just read that you can use a DataReader with custom paging. Sorry for the confusion.

 
Old August 13th, 2004, 03:00 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

In case the term "custom paging" hasn't helped yet, here's an article that explains custom paging:

http://www.devhood.com/tutorials/tut...tutorial_id=97

Cheers,

Imar
 
Old August 14th, 2004, 03:09 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

stu9820 ,I'm not sure he could come back(I mean going previous page) while using DataReader.

--------------------------------------------
Mehdi.:)
 
Old August 15th, 2004, 06:32 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You can use a DataReader for a repeating control (such as a datagrid, datalist, repeater, etc). When you involve paging of a datagrid, you STILL can use a DataReader. Remember that we are dealing with a stateless paradigm here: ASP.NET. When you rebind a datagrid or another object to go to another page of data, you are usually refreshing the entire data source anyway and starting from the beginning, then you are going to the particular page of data you wish to see. In the case of a datagrid, it does all that for you. In the case of custom paging (for a datagrid or some handmade repeating scenario), you must write the code (usually the sql query) that accesses the particular "page" you wish to see. But in either case, you are still only using a forward-only data source (the datareader). So when you go "back" a page you are technically only going forward n-1 pages from where you were (n).
 
Old August 15th, 2004, 11:45 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
quote:
But in either case, you are still only using a forward-only data source (the datareader).
So when you go "back" a page you are technically only going forward n-1 pages from where you were (n).
I think its time-consuming,using SP(sql queries)could be better.
Thanks to Peter.

--------------------------------------------
Mehdi.:)
 
Old August 16th, 2004, 08:19 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What is time-consuming? You have to "page" the data somewhere. It's just a matter of where you do it. If you want to perform optimization to the extreme, then yes, you should write queries that page the data and use custom paging. There's little point in transporting data that you don't use. If your database server is not the same physical machine as your web server then you definately could increase performance that way.
 
Old August 16th, 2004, 09:32 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

I ment something you mentioned
Quote:
quote:
If you want to perform optimization to the extreme, then yes, you should write queries
peter can you explain more this you mentioned
Quote:
quote:
There's little point in transporting data that you don't use. If your database server is not the same physical machine as your web server then you definately could increase performance that way.
do you mean they are something like Sequential files against Random(Direct)files
i.e in a Sequential file for getting a record you must read all previous records
but in Random Files you can access a record directly
did you mean like I told




--------------------------------------------
Mehdi.:)
 
Old August 17th, 2004, 05:40 AM
ham ham is offline
Authorized User
 
Join Date: Aug 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi

i want to implement paging using asp.Net, i m not using datagrid repeator control etc.
i m just using html table and datareader.
i want just 10 rows to be displayed per page , how i do this








Similar Threads
Thread Thread Starter Forum Replies Last Post
URGENT plz do reply maheshoo7 PHP How-To 1 June 26th, 2007 10:20 AM
give me urgent reply asudhakar C# 1 April 9th, 2007 06:35 AM
give me urgent reply asudhakar C# 1 March 30th, 2007 07:55 AM
urgent reply required uitian123 Crystal Reports 0 August 19th, 2005 12:48 AM
Urgent reply needed. hums VS.NET 2002/2003 1 October 2nd, 2004 10:29 PM





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