ASP.NET MVC – Getting QueryString values

Query string parameters can be accepted simply by using an argument on the action – i.e.

public ActionResult Foo(string someValue, int someOtherValue) {...}

which will accept a query like .../someroute?someValue=abc&someOtherValue=123

Other than that, you can look at the request directly for more control.

Leave a Comment