HttpApplication.GetVaryByCustomString(HttpContext, String) 方法

定义

提供该属性的应用程序范围的实现 VaryByCustom

public:
 virtual System::String ^ GetVaryByCustomString(System::Web::HttpContext ^ context, System::String ^ custom);
public virtual string GetVaryByCustomString(System.Web.HttpContext context, string custom);
abstract member GetVaryByCustomString : System.Web.HttpContext * string -> string
override this.GetVaryByCustomString : System.Web.HttpContext * string -> string
Public Overridable Function GetVaryByCustomString (context As HttpContext, custom As String) As String

参数

context
HttpContext

包含 HttpContext 有关当前 Web 请求的信息的对象。

custom
String

指定用于响应当前请求的缓存响应的自定义字符串。

返回

如果参数的值为custom,则为浏览器的 "browser";否则为 Typenull

注解

可以重写 GetVaryByCustomString 以添加新方法来计算基于当前请求的自定义因值而异。 实现必须为无法识别的自定义值调用基类。 有关详细信息,请参阅 如何:使用自定义字符串缓存页面的版本

适用于

另请参阅