Global:Request.UserAgent
Version: - globalvalueSummary
Returns the user agent string of the client browser.
Most Web browsers use a User-Agent value as follows: Mozilla/[version] ([system and browser information]) [platform] ([platform details]) [extensions].
Example: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Settings
The value is generated automatically.
Examples
Outputting the template tag
@GetGlobalValue("Global:Request.UserAgent")
Check if tag has a value
@if(!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Request.UserAgent"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
string storedTag = GetGlobalValue("Global:Request.UserAgent");
}
Outputting the template tag
<!--@Global:Request.UserAgent-->
Check if globalvalue has a value
<!--@If Defined(@Global:Request.UserAgent)-->
Let's output this tag here: <strong><!--@Global:Request.UserAgent--></strong>
<!--@EndIf(@Global:Request.UserAgent)-->