I want to have different sorting and filtering applied on my view I figured that i'll be passing sorting and filtering params through query string
<%= Html.ActionLink("Name", "Index", new { SortBy= "Name"}) %>
this simple construction allows me to sort.
view comes back with
?SortBy=Name
in query string
now i want to add filtering and i want my query strig to end up with
?SortBy=Name&Filter=Something
how can i add another parameter to list of already existing ones in ActionLink?
example:
user requests /Index/
view has
<%= Html.ActionLink("Name", "Index", new { SortBy= "Name"}) %>
and
<%= Html.ActionLink("Name", "Index", new { FilterBy= "Name"}) %>
links
first one looks like /Index/?SortBy=Name second is /Index/?FilterBy=Name
i want when user pressed sorting link after he applied some filtering - filtering is not lost, so i need a way to combine my params. My guess is there should be a way to not parse query string, but get collection of parameters from some mvc object.