List of DB clients in the program page in C #

-1

My problem is as follows, I do not know how to make a list of users with a limit of X in a DB appear on the screen, I will try to put them into topics for a better understanding

1 - Customer list should appear every 10 months 2 - When reached the 10 would have, a button or arrow to the next page
3 - I saw some tutorials with gridview, but that's not what I'm looking for
4 - When they appear they should come as a linklabel
5 - When clicked the linklabel the client id should be passed to another form

I hope this is possible, if someone can explain how to do it, I'm grateful. I do not know if it makes a difference but I use Visual Studio 2010 Professional, and I use the sql server

    
asked by anonymous 12.01.2018 / 19:45

1 answer

-1

Dude, from what I understand, you want me to show you a list of 10 users and then go to the page on that list, is that it?

I made an example using PagedList. I'll leave an example of how I managed to do it.

In the controller I did this: using PagedList;

    public ActionResult Index(int? pagina)
    {
        var ListaEventos = db.Objetos.Tolist();
        int PaginaTamanho = 4; //<<<<<Tamanho de objetos na pagina(no seu caso coloca 10)
        int paginaNumero = (pagina ?? 1);


        return View(ListaEventos.ToPagedList(paginaNumero, PaginaTamanho));

In the html I just put it like this:

Page @ (Model.PageCount

12.01.2018 / 19:57