Let's say I have a ActionResult method that has a pageNumber parameter and a category parameter.
The user should be able to set the category he's browsing which would be a ActionLink to the first page of that category. However if I have an another ActionLink where I go to the next page the category parameter would go back to default.
How can I set the category parameter to be the same as on the previous page.
EDIT: Originally supposed to be a comment, but grow in size
Sorry, I see my question isn't clear enough wrote it in a kind of hurry. I'm kinda trying to do what you are doing but instead of setting the category as 1 I wan't it set as the parameter was when this page was loaded.
Scenario: I am browsing the website and click "shoes" (categoryID = 3) wich has this actionlink
<%=Html.ActionLink("Shoes", "Index", new { categoryID = 3 }) %>
I get the first page of shoes and then I wan't to skip to the next page which has a actionlink
<%=Html.ActionLink(">>>", "Index", new { page = model.currentPage + 1 }) %>
I can't include categoryID parameter in this actionlink code because in my generic view code I of course don't know which category is active.
So when I click on that it switches to the default category again.