Sitecore 5.0 API

State.QueryString Property

Gets or sets the current query string collection.

[Visual Basic]
Public Shared Property QueryString As NameValueCollection
[C#]
public static System.Collections.Specialized.NameValueCollection QueryString {get; set;}

Property Value

A name/value collection of arguments on the query string.

Remarks

The Sitecore request handler (HttpModule) overrides the current query string in order to find the correct layout for the page. The normal query string object (QueryString) is therefore not valid. However Sitecore stores the original query string in this variable before overwriting it.

The scope of the value is page and it is stored in the Items variable "SC_QUERY_STRING".

Example

  string print = State.QueryString["print"];

See Also

State Class | Sitecore.Configuration Namespace | Form