I'm trying to implement some simple paging, based on http://stackoverflow.com/questions/446196/how-do-i-do-pagination-in-asp-net-mvc
The paging works fine.
However, I'm now trying to create previous and next links, but can't figure out how to access the params:
My route looks like:
routes.MapRoute(
"Name",
"Controller/ActionName/{pageID}",
new { controller = "Controller", action = "ActionName" , pageID = 0 },
new { pageID = @"\d*"}
);
And my next link looks like:
<%=Html.ActionLink("next page", "ActionName", "Controller", new {pageID = pageID + 1 }, null) %>
The error I get is:
Compiler Error Message: CS0103: The name 'pageID' does not exist in the current context
How should I create the Prev/Next links (or, in this case, just the next)?