Click here to Skip to main content
15,892,797 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi ,
I am working on a project like twitter. In that user can post an article or everything. That posts are shown in slide show. Right now I have three buttons in that. 1>next 2>previous 3> stop. I am showing top 10 posts in a slide show. The question is that I want another button for next 10 posts. How to show them? and how to handle previous event? please help me..
Posted

1 solution

int currentIndex = 0;
int pageSize = 5;

string orderSQL = "SELECT * FROM Orders ORDER BY OrderID";
// Assumes that connection is a valid SqlConnection object.
SqlDataAdapter adapter = new SqlDataAdapter(orderSQL, connection);

DataSet dataSet = new DataSet();
adapter.Fill(dataSet, currentIndex, pageSize, "Orders");

http://msdn.microsoft.com/en-us/library/tx1c9c2f.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900