Create ActionLink with Attached Parameters With ASP.Net MVC Without Declaring Routes

actionlinkasp.net-mvc-3razor

I am interested in creating URL with ASP.Net MVC 3 that has a QuerySting Attached but everywhere I look it says I need to Create a Route. Does anyone know how to create this:

    <a href="/home/search/1120000000?page=3">Next Page</a>

Using the Html.ActionLink helper.

Best Answer

@Html.ActionLink("Next Page",
                 "search",
                 new{controller="home", id="1120000000", page="3"})

if you have the default route setup it will produce

<a href="/home/search/1120000000?page=3">Next Page</a>