Share via


BrowserHelpers.SetOverriddenBrowser Method (HttpContextBase, BrowserOverride)

Overrides the request's actual user agent value using the specified browser override information.

Namespace:  System.Web.WebPages
Assembly:  System.Web.WebPages (in System.Web.WebPages.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Sub SetOverriddenBrowser ( _
    httpContext As HttpContextBase, _
    browserOverride As BrowserOverride _
)
'Usage
Dim httpContext As HttpContextBase 
Dim browserOverride As BrowserOverride 

httpContext.SetOverriddenBrowser(browserOverride)
public static void SetOverriddenBrowser(
    this HttpContextBase httpContext,
    BrowserOverride browserOverride
)
[ExtensionAttribute]
public:
static void SetOverriddenBrowser(
    HttpContextBase^ httpContext, 
    BrowserOverride browserOverride
)
static member SetOverriddenBrowser : 
        httpContext:HttpContextBase * 
        browserOverride:BrowserOverride -> unit
public static function SetOverriddenBrowser(
    httpContext : HttpContextBase, 
    browserOverride : BrowserOverride
)

Parameters

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).

See Also

Reference

BrowserHelpers Class

SetOverriddenBrowser Overload

System.Web.WebPages Namespace