Appendix: Using the QUERYSTRING Element Tag

You can return and display all or part of the current page's URL on a page. You can specify a particular part of the URL to display, or all of it.

This element tag has the following default syntax:

<%# QUERYSTRING(Key) %>

The following parameters are required:

Parameter Description
Key Enter part of a URL between the parentheses to return that specific element, or leave the tag empty to return the complete query string from the URL.

The following example of a QUERYSTRING tag is used to return the value of an item in the site URL, in this case the name of a fruit the user has selected. The URL is structured as follows:

https://mysite.co.uk/basket?fruit=

The QUERYSTRING tag is formatted as follows:

<%# QUERYSTRING(fruit) %>