Home > front end >  The front page of how to determine the article page number is better?
The front page of how to determine the article page number is better?

Time:03-26

Article 1, fixed how much each page, such as 20, 40, can choose between numerical
Article 2, according to the height of the visible area calculation shows each page number

CodePudding user response:

Background:
 CulturesList=Cultures 
//make sure to order the items before the paging
OrderBy (x=& gt; X.E nglishName)

//the skip the items before the current page
Skip ((P - 1) * S)

//take only 10 (page size) items
Take (S)

//call ToList () at the end to execute the query and return the result set
ToList ();

CodePudding user response:

Front end:
 & lt; The table & gt; 


LCID
English Name
Native Name
Culture types



@ foreach (var Model in c CulturesList)
{

@ c.L CID
@ c.E nglishName
@ c.N ativeName
@ Arthur c. ultureTypes

}

  • Related