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

which type of data u send through request.querystring()?and tell abt exact size?

1 Answers   CSC, Nay Company,


What is difference between session and cookies in asp net?

1 Answers  


What is the best Macanism to clear the Cache in asp.net

1 Answers   MCN Solutions,


Why should i prefer JSP over asp.net or any other web development language..??

1 Answers  


Define a multilingual website?

1 Answers  


what is use to destroy an object? illustrate.

2 Answers   Patni,


14. What are your Future Plans for Swatz Oils GROUP U.K?

1 Answers   CSC, Swatz Oils, TCS,


When is the ViewState available during the page processing cycle ?

6 Answers   Siebel,


what is stateless ?

2 Answers   TCS,


Explain difference between friend and protected friend?

1 Answers  


By default, Web API sends HTTP response with which of the following status code for all uncaught exception?

1 Answers  


What types of data validation events are commonly seen in the client-side form validation?

1 Answers  


Categories