PagedList in BootStrap pop-up Modal using Asp.Net CORE MVC

I am showing some data in modal pop-up using BootStrap .Basically I am using for each loop for displaying Data. So I would like to know, How To apply paging in these scenario using PagedList asp net core mvc or any other plugin in pop-up modal.

thank you

Asked by:- Nguyễn ThànhThịnh
: 4158 At:- 7/5/2018 2:58:41 PM
asp net core mvccore netcore

2 Answers
profileImage Answered by:- jaya

You can show data in Bootstrap pop-up modal like you do basically in all Razor pages in MVC.

To implement paging (IPagedList) inside pop-up modal, You would require to use jQuery plugin with it or you can use LazZiya Taghelper

Add this paging Nuget Package, by navigating to Tools -> Nuget Package Manager -> Manage Nuget Packages -> Search for "LazZiya.TagHelpers"

Create the Razor Code as below sample HTML

@addTagHelper *, LazZiya.TagHelpers
@model PagedResult<Employee>
<table cellpadding="0" cellspacing="0" class="table table-bordered table-condensed">
        <th>Emp Id</th>
        <th>First Name</th>
        <th>Last Name</th>
        <th>Job Title</th>
    @foreach (var products in Model.Results)

<paging page-no="@Model.CurrentPage"

If you don't like the above solution, you can also use jQuery based solution, by fetching results in JSON and then using below jQuery plugin. (jQuery based paging) (Another plugin for Paging for .NET Core)

Creating GridView in ASP.NET Core MVC with Paging (Detailed article on Paging in GridView)

At:- 7/5/2018 6:01:04 PM
I have used it, and there are more plugins for jQuery pagination which makes pop-up modal pagination much easier. 0
By : jon - at :- 7/9/2018 11:35:19 AM

profileImage Answered by:- Sam

If the above solution didn't worked for you, please check this article

This is MVC solution but should work with ASP.NET Core also.

At:- 9/4/2018 10:46:57 AM

Login/Register to answer
Register directly by posting answer/details

Full Name *

Email *

By posting your answer you agree on privacy policy & terms of use

Subscribe Now

Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly