Including All querystring parameters in Html.ActionLink
asp.net-mvc, asp.net-mvc-3, c#, query-string
Solution
It is not a built in solution, even though it seems to address exactly what you are looking for:
ASP.NET MVC Build Url Based on Current Url
Problem
In my page i have ``` @using (Html.BeginForm("list", "menu", FormMethod.Get)) { <div> Show categories: @Html.DropDownList("groupName", (SelectList)ViewBag.groups) <input id="Submit1" type="submit" value="Show" /> </div> } ``` Regarding the option the user choose i generate a list and the Querystring in my address going to be like : ``` localhost/menu/list?groupName=controlpanel ``` My problem is when i use HtmlActionLink for example : ``` @Html.ActionLink("Title", "List", new { foo = item.foo}) ``` What i got in result is result is : ``` localhost/menu/List?foo=123 ``` instead of : ``` localhost/menu/List?foo=123&groupName=controlpanel ``` Am i missing something ??