In my application, key query string parameter can be used to grant access to certain actions/views. Now I want all ActionLinks and Forms to automatically in
key
The simplest thing is to put the "key" parameter in all the Url.Action and Html.ActionLink in this way:
@Url.Action("MyAction", "MyController", new { key = Request["key"] })
if Request["key"] is empty the querystring parameter will be skipped.
Request["key"]