If i have 1000 records in dataset, how to do paging?

Answers were Sorted based on User's Feedback



If i have 1000 records in dataset, how to do paging?..

Answer / arunbhararthi

you can use dataadapter fill method to implement paging in
dataset.

following is the syntax:

Public Overloads Function Fill(ByVal dataSet As DataSet,
ByVal startRecord As Integer, ByVal maxRecords As Integer,
ByVal srcTable As String) As Integer

WHERE dataSet is a DataSet to fill with records and, if
necessary, schema, startRecord is the zero-based record
number to start with, maxRecords is the maximum number of
records to retrieve, and srcTable is the name of the source
table to use for table mapping.which returns a DataSet
filled with the records based on the page size passed in the
method

for example:

da.fill(ds,0,100,"emp")

Is This Answer Correct ?    14 Yes 1 No

If i have 1000 records in dataset, how to do paging?..

Answer / sunil kumar singh

for(int i=0;i<ds.Count;i++)
{
arraylist arr=new arraylist();
string abc;
abc=ds.Tables["tablename"].Rows[0][i].ToString();
arr.Add(abc);
}

Is This Answer Correct ?    4 Yes 9 No

Post New Answer

More ASP.NET Interview Questions

What is owin authentication?

0 Answers  


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

3 Answers   Wipro,


what is a .xap file? Explain with an example.

0 Answers  


How do I publish my asp.net application to my isp's web server?

0 Answers  


Difference between application and session ?

12 Answers   DataPoint, Satyam,






What are early binding and late binding.

0 Answers  


Define session in asp.net.

0 Answers  


What are the different types of cookies in asp.net?

0 Answers  


Breifly explain about stack and heap memory Managemet?

2 Answers  


what is difference between User Control,Custom Contro1,Web server control and template controls

1 Answers  


What are asynchronous callbacks?

0 Answers   Accenture,


Where does the Web page belong in the .NET Framework class hierarchy?

1 Answers  


Categories