|
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
|
|
|
August 13th, 2004, 05:57 AM
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
August 13th, 2004, 08:10 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
A datareader doesn't implement an ICollection interface so you can't use it. You have to use a DataTable.
|
August 13th, 2004, 02:25 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
I just read that you can use a DataReader with custom paging. Sorry for the confusion.
|
August 13th, 2004, 03:00 PM
|
|
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
August 14th, 2004, 03:09 AM
|
Friend of Wrox
|
|
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
|
|
stu9820 ,I'm not sure he could come back(I mean going previous page) while using DataReader.
--------------------------------------------
Mehdi.:)
|
August 15th, 2004, 06:32 PM
|
|
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
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).
|
August 15th, 2004, 11:45 PM
|
Friend of Wrox
|
|
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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.:)
|
August 16th, 2004, 08:19 AM
|
|
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
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.
|
August 16th, 2004, 09:32 AM
|
Friend of Wrox
|
|
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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.:)
|
August 17th, 2004, 05:40 AM
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|
|