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 the difference between exe and dll?

0 Answers  


which is best possible way to add data source to data grid when the data is huge(10 lack recored)how to edit a perticular row

3 Answers   Airtel, Aviva,


What are the types of validation in asp net?

0 Answers  


What is Web Services?How we can consume a Web Services in our application?Explain.

1 Answers   Religare,


Explain the advantages of passport authentication.

0 Answers  






Explain the significance of routing? : asp.net mvc

0 Answers  


How does session work in asp net?

0 Answers  


how can u display multi language (i.e english,spanish...) web site?

2 Answers  


What are all the various Estimation Techniques available ?

0 Answers   MCN Solutions,


What is the difference between a default skin and a named skin?

0 Answers   MindCracker,


what is silver light when will we use silver light,

0 Answers  


What is redirectpermanent in asp.net?

0 Answers  


Categories