views:

21

answers:

1

Hello,

How do I get my original query string appended to the end of the pager output? All I am getting now is this:

http://localhost:4988/Assets/Browse/1?page=2&Visible=false

I need all the various name/value pairs from my query string appended onto the next/previous links.

Also, what is “visible” used for in the above link? I didn’t add that.

Thank you,

Rick

+1  A: 

IIRC the MVCContrib Pager helper automatically appends all query string parameters to the page links in addition to the currentPage parameter. If for some reason this doesn't happen you could use the Link method to create the link yourself:

<%= Html.Pager(Model)
        .Link(currentPage => Url.Action("someAction", new { 
            page = currentPage, 
            someParam = "someValue", 
            someOtherParam = "someOtherValue" 
        })) 
%>
Darin Dimitrov
This is a good workaround. Thank you.
rboarman