OutputCacheProfile.Location 属性

定义

获取或设置输出缓存位置。

public:
 property System::Web::UI::OutputCacheLocation Location { System::Web::UI::OutputCacheLocation get(); void set(System::Web::UI::OutputCacheLocation value); };
[System.Configuration.ConfigurationProperty("location")]
public System.Web.UI.OutputCacheLocation Location { get; set; }
[<System.Configuration.ConfigurationProperty("location")>]
member this.Location : System.Web.UI.OutputCacheLocation with get, set
Public Property Location As OutputCacheLocation

属性值

OutputCacheLocation 枚举值之一。 默认值为 Any

属性

示例

下面的代码示例说明如何使用 Location 属性。


// Get the current Location.
System.Web.UI.OutputCacheLocation locationValue = 
    outputCacheProfile.Location;

// Set the Location property to null.
outputCacheProfile.Location = 
    System.Web.UI.OutputCacheLocation.Server;
  ' Get the current Location.
  Dim locationValue _
  As System.Web.UI.OutputCacheLocation = _
  outputCacheProfile.Location

' Set the Location property to null.
  outputCacheProfile.Location = _
  System.Web.UI.OutputCacheLocation.Server

注解

如果 Location 设置为 Any,则输出缓存可以位于请求发起位置的浏览器客户端上;位于参与请求的代理服务器或任何其他服务器上;也可以位于处理请求的服务器上。

适用于

另请参阅