Asp – QueryString Parameters in Mvc strongly typed actionlinks

asp.net-mvc

I think there is no overload available to add parameters other than the action parameters list while creating actionlink through strongly typed action links. What I want is to add extra parameters which will be available in querystring .
For example with action MyAction(int id) in controller MyController.
Html.ActionLink(mc=>mc.MyAction(5),"My Action") will produce link something like MyController/MyAction/5 but what I want is append querystring like this.
MyController/MyAction/5?QS=Value. Is there any way,using strongly typed actionlinks, to achieve this.

Best Answer

<%=Html.ActionLink(LinkName, Action, Controller, new { param1 = value1, param2 = value2 }, new { })%>
Related Topic