Global:Request.PathAndQuery

Version: - globalvalue  

Summary

Returns the AbsolutePath and Query properties separated by a question mark (?).

Without a query string: /Default.aspx?ID=204
With a query string: /Default.aspx?ID=21&M=News&PID=1296&NewsID=7

Settings

The value is generated automatically.

Examples

Outputting the template tag

@GetGlobalValue("Global:Request.PathAndQuery")

Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Request.PathAndQuery"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetGlobalValue("Global:Request.PathAndQuery"); }

Outputting the template tag

<!--@Global:Request.PathAndQuery-->

Check if globalvalue has a value

<!--@If Defined(@Global:Request.PathAndQuery)--> Let's output this tag here: <strong><!--@Global:Request.PathAndQuery--></strong> <!--@EndIf(@Global:Request.PathAndQuery)-->