BrowserHelpers.GetOverriddenUserAgent Method
Returns the overridden user agent value or the actual user agent string if no override has been specified.
Namespace: System.Web.WebPages
Assembly: System.Web.WebPages (in System.Web.WebPages.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function GetOverriddenUserAgent ( _
httpContext As HttpContextBase _
) As String
'Usage
Dim httpContext As HttpContextBase
Dim returnValue As String
returnValue = httpContext.GetOverriddenUserAgent()
public static string GetOverriddenUserAgent(
this HttpContextBase httpContext
)
[ExtensionAttribute]
public:
static String^ GetOverriddenUserAgent(
HttpContextBase^ httpContext
)
static member GetOverriddenUserAgent :
httpContext:HttpContextBase -> string
public static function GetOverriddenUserAgent(
httpContext : HttpContextBase
) : String
Parameters
- httpContext
Type: System.Web.HttpContextBase
The current context.
Return Value
Type: System.String
The user agent string
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type HttpContextBase. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.111) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.111).