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 are the different types of sessions in asp.net? Name them?

0 Answers  


Can you clarified A Web service can only be written in .NET or not?

0 Answers   Siebel,


What is WCF

4 Answers  


What is difference between web config and global asax?

0 Answers  


What is the first name space in .netF/W heirarchy

3 Answers   Wipro,






what is DLL Hell and how it is solved in .NET?

24 Answers   icegen, next, -uk, NIIT,


Can you create an app domain ?

1 Answers  


Do you support digital rights management to protect my videos?

0 Answers  


What is AppDomain?Explain how it works.

9 Answers   Tech Mahindra,


Code for scolling in gridview

1 Answers   TCS,


how to do pakaging nd deployment

1 Answers  


Explain the difference between an exe and a dll?

0 Answers  


Categories