I am trying to set up a page that has two behaviors. I\'m separating them by URL: One behavior is accessed via /some-controller/some-action, the other is via
John Sherman's answer is only technically correct. Query parameters without values are not supported, but query values without keys are supported.
In other words, "/some-controller/some-action?customize" is considered to be a URL with one query parameter whose value is "customize", and which has no key (i.e. a key of null).
To retrieve all such query parameters you use Request.QueryString.GetValues(null) to retrieve them as an array of strings, or you can use Request.QueryString[null] to get them as a single comma delimited string.
An empty parameter (as occurs in "?foo=bar&&spam=eggs"), will show up as a value of string.Empty with a key of null, as does a trailing "&".
The rather unusal query string "?&", for example, will show up as two values of string.Empty, both having a key of null.
There is one edge case which does not fit the pattern. That is the empy but present query string (e.g. "/some-controller/some-action?"). Based on the pattern previously shown it would have one value, namely string.Empty with a key of null. However, in reality it will have no values.