Problem Paging with Post Action in ASP.NET MVC
        Posted  
        
            by Lukasz
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Lukasz
        
        
        
        Published on 2010-04-23T02:28:23Z
        Indexed on 
            2010/04/23
            2:33 UTC
        
        
        Read the original article
        Hit count: 364
        
I have a page that takes a number of parameters on a form and posts them to an action. It returns a number of search results that need to be paged through. My pager uses ActionLink;
<%= Html.ActionLink(i.ToString(), "Basic", new { page = (i - 1) })%>
The results comeback as expected but when I click on page two it goes to the default Action, not the one marked with post. The form values do no get submitted again and the results that are shown for page two are the default results not filters with the parameters.
I am not sure how to solve this problem? One way was to save the form values into the database on the post and reading them back on the default action but it seems overkill.
Thank You!
© Stack Overflow or respective owner