I am able to get my query from the DB, but I want to limit the display to the first 10 rows.
MembershipUser currentUser = Membership.GetUser();
string userId = SqlDataLayer.GetClientIdByName(currentUser.UserName);
DataTable allInvoices = SqlDataLayer.mostRecentOrders(SqlDataLayer.GetClientIdByName(currentUser.UserName));
if (allInvoices.Rows.Count > 0)
noResults.Visible = false;
repResults.Visible = true;
repResults.DataSource = allInvoices;
for (int i = 0; i < 10; i++)
noResults.Visible = true;
repResults.Visible = false;
I am new to C #, I'm sure it's something simple but I am not sure what the issue is. When I test the code, all the rows are being displayed.
View Complete Post