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

Explain the use of resource manager class in .net.

0 Answers  


What is difference Data List and Data Repeater Control ?

1 Answers   TCS,


Can I tap into other windows livetm services?

0 Answers  


how many session modes are available?some brief explnation

1 Answers  


What are the advantages of using Master Pages?

0 Answers   MCN Solutions,






To display data in a Repeater control which templete is provided ?

4 Answers   Siebel,


Explain ViewState?

0 Answers   QuestPond,


what is the trace in ASP.NET

4 Answers  


How does the cookies work in asp.net?

0 Answers  


what are the web form events available in asp.net?

0 Answers  


can u debug application programatically? if yes how?

0 Answers   FactorH,


What are validator? Name the Validation controls in asp.net? How do u disable them?

2 Answers  


Categories