Grid-view paging using .net MVC core with SQL stored procedure

coder rock 436 Reputation points
2024-10-25T14:07:09.1766667+00:00

I am new to .net core mvc what is best way to do Grid-view paging using .net MVC core with SQL stored procedure

Developer technologies ASP.NET ASP.NET Core
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2024-10-25T18:23:36.9933333+00:00

    Use the offset and fetch next to paginate.


  2. SurferOnWww 4,706 Reputation points
    2024-10-27T01:14:34.6166667+00:00

    Is the "Grid-view" mentioned in your question the GridView control available in the ASP.NET Web Forms application?

    My means grid table not grid view.

    I recommend that you follow the following Microsoft tutorial as introduced by @AgaveJoe in the comment above.

    Tutorial: Add sorting, filtering, and paging - ASP.NET MVC with EF Core

    As for a use of ADO.NET and stored procedure, it is not practical if you need not only paging but also sorting and filtering which are shown in the tutorial. Therefore, I suggest that you use the EF Core and linq to Entities as described in the tutorial.

    Please let me know if you do not need the sorting and filtering.

    0 comments No comments

  3. SurferOnWww 4,706 Reputation points
    2024-10-27T01:14:56.54+00:00

    deleted as duplicated

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.