共用方式為


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,輸出快取可位於請求來源瀏覽器用戶端;代理伺服器或參與請求的其他伺服器;或請求處理的伺服器。

適用於

另請參閱