教學課程:新增排序、篩選及分頁 | mvc排序
本文內容 在上一個教學課程中,您已針對學生實體的基本CRUD作業實作一組網頁。Intheprevioustutorial,youimplementedasetofwebpagesforbasicCRUDoperationsforStudententities.在本教學課程中,您要將排序、篩選和分頁功能新增至Students的[索引]頁面。Inthistutorialyoulladdsorting,filtering,andpagingfunctionalitytotheStudentsIndexpage.此外,還要建立將執行簡易群組的頁面。Youllalsocreateapagethatdoessimplegrouping.下圖顯示當您完成時的頁面外觀。Thefollowingillustrationshowswhatthepagewilllooklikewh...
本文內容在上一個教學課程中,您已針對學生實體的基本 CRUD 作業實作一組網頁。In the previous tutorial, you implemented a set of web pages for basic CRUD operations for Student entities. 在本教學課程中,您要將排序、篩選和分頁功能新增至 Students 的 [索引] 頁面。In this tutorial youll add sorting, filtering, and paging functionality to the Students Index page. 此外,還要建立將執行簡易群組的頁面。Youll also create a page that does simple grouping.
下圖顯示當您完成時的頁面外觀。The following illustration shows what the page will look like when youre done. 資料行標題是使用者可以按一下以依據該資料行排序的連結。The column headings are links that the user can click to sort by that column. 重覆按一下資料行標題,可切換遞增和遞減排序次序。Clicking a column heading repeatedly toggles between ascending and descending sort order.
在本教學課程中,您:In this tutorial, you:
新增資料行排序連結Add column sort links 新增 [搜尋] 方塊Add a Search box 為 Students 索引新增分頁Add paging to Students Index 為 Index 方法新增分頁Add paging to Index method 新增分頁連結Add paging links 建立 [關於] 頁面Create an About page PrerequisitesPrerequisites 新增資料...