EDIT 01-10-2014:
Since this question is so popular this answer has been improved.
The example above will only get the values from RouteData, so only from the querystrings which are caught by some registered route. To get the querystring value you have to get to the current HttpRequest. Fastest way is by calling (as TruMan pointed out) `Request.Querystring' so the answer should be:
EDIT 03-05-2019:
Above solution is working for .NET Framework.
As others pointed out if you would like to get query string value in .NET Core you have to use Query object from Context.Request path. So it would be:
Please notice I am using StringValues("1") in the statement because Query returns StringValues struct instead of pure string. That's cleanes way for this scenerio which I've found.
It was suggested to post this as an answer, because some other answers are giving errors like 'The name Context does not exist in the current context'.