I have a problem with Html.ActionLinkmethod.

If I use

@Html.ActionLink("Some text", "MyAction", "MyController", new { id = 1234 }, null)

I get a link with this href:

http://web.com/MyController/MyAction/1234

That is fine, but if I use more route values like

@Html.ActionLink("Some text", "MyAction", "MyController", new { id = 1234, param1 = 3, param2 = 10 }, null)

I get a link with this href:

http://web.com/MyController/MyAction/1234?param1=3&param2=10

But I need:

http://web.com/MyController/MyAction/1234/3/10

Do you know how can I get it?

Related posts

Recent Viewed