1

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.

1 Answer 1

7
@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>
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. That is much better than the ways I had been seeing and also a lot better than the one just stumbled upon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.