How do you implement Paging in .Net ?



How do you implement Paging in .Net ?..

Answer / gitam singh

The DataGrid provides the means to display a group of records from the data source (for example, the first 10), and then navigate to the "page" containing the next 10 records, and so on through the data.
Using Ado.Net we can explicit control over the number of records returned from the data source, as well as how much data is to be cached locally in the DataSet.
1.Using DataAdapter.fill method give the value of 'Maxrecords' parameter
(Note: - Don't use it because query will return all records but fill the dataset based on value of 'maxrecords' parameter).
2.For SQL server database, combines a WHERE clause and a ORDER BY clause with TOP predicate.
3.If Data does not change often just cache records locally in DataSet and just take some records from the DataSet to display.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What is special types forms

0 Answers   MCN Solutions,


How do you implement sql caching in asp.net?

0 Answers  


What is the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc

0 Answers  


what is assembly?

4 Answers   Microsoft,


How does session id work?

0 Answers  






What is the transport protocol you use to call a Web service?

2 Answers   Siebel Systems,


hi i have a problem regarding to datagrid in aspdotnet.i have a datagrid in my application.i have to place add,edit,delete buttons or links what ever it may be. now the problem is if i click on add button then the page has to redirected to another form called "xyz.aspx" and if i click on edit button the page has to redirected to another form called "abc.aspx".i am phasing the problem that if where ever i click on the datagrid the cursor goes to gv1_SelectedIndexChanged event.please tell me the solution about the code.

4 Answers   Lambent,


Explain what the contents of cookie?

0 Answers  


hai to all. what is the procedure for " web hosting ".If you know please message me at "yoursguna@gmail.com". Thank u...

1 Answers  


What is the difference between Proxy and Contract?

1 Answers  


Define WCF ABC , Diffrent Contract. Diff b/w Wcf and in webservice

2 Answers   Syntel,


Explain the life cycle of an ASP .NET page.

2 Answers  


Categories