Share via


BrowserHelpers.GetVaryByCustomStringForOverriddenBrowser Method (HttpContext)

Gets a string that varies based on the type of the browser.

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function GetVaryByCustomStringForOverriddenBrowser ( _
    httpContext As HttpContext _
) As String
'Usage
Dim httpContext As HttpContext 
Dim returnValue As String 

returnValue = httpContext.GetVaryByCustomStringForOverriddenBrowser()
public static string GetVaryByCustomStringForOverriddenBrowser(
    this HttpContext httpContext
)
[ExtensionAttribute]
public:
static String^ GetVaryByCustomStringForOverriddenBrowser(
    HttpContext^ httpContext
)
static member GetVaryByCustomStringForOverriddenBrowser : 
        httpContext:HttpContext -> string
public static function GetVaryByCustomStringForOverriddenBrowser(
    httpContext : HttpContext
) : String

Parameters

Return Value

Type: System.String
A string that identifies the browser.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type HttpContext. 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).

Remarks

This method can be used with the HttpApplication.GetVaryByCustomString method in order to differentiate cache keys that are based on the overridden browser.

See Also

Reference

BrowserHelpers Class

GetVaryByCustomStringForOverriddenBrowser Overload

System.Web.WebPages Namespace