[RESOLVED]load more button on an MVC project

I have displayed the data from a database using MVC 5 in a table form.what I want to add is a button that says show more where I can set the number of records to be shown in each page load.can someone please guide me how to do that?

lolo512

hat I want to add is a button that says show more

<button

lolo512

can set the number of records to be shown in each page load.

<input 

Put into the user session and display into the view. When lost focus( blur in javascript) send Ajax and put again into User Session

lolo512

I have displayed the data from a database using MVC 5 in a table form

How are you loading this and how many records are you showing initially.

lolo512

.what I want to add is a button that says show more where I can set the number of records to be shown in each page load

As
ignatandrei
 suggested you can put a textbox and button. User inputs the records to be shown in the textbox and clicks on the button. You can follow your initially logic to reload the page with the number of records in the table

It looks like you are trying to implement infinite page scrolling. See the following article :

Infinte Scroll paging in asp.net mvc

Leave a Reply