Get FormCollection in Page Navigation

0

In an ASP.NET C # MVC4 system I have some screens where I show some data. These screens have Filters and navigation (maximum limit of 10 data per page). I would like to know how I can save the FormCollection in some way so that it passes the pagination. An example of my control:

public ActionResult Orcamentos(int? page)
{

}

public ActionResult Orcamentos(int? page, FormCollection form)
{

}

Within these methods I already do everything right, working correctly and showing in the View correctly. Now in the view that is the problem, in the navigation of the pages I can pass the Form so that it enters the method with Form.

In View, the pagination part looks like this:

@Html.PagedListPager(Model, (page) => Url.Action("Index", new { page = page, form = @ViewBag.filtro }), PagedListRenderOptions.Classic )

    
asked by anonymous 16.04.2015 / 01:14

0 answers