Share via


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 ,則輸出快取可以位於瀏覽器用戶端上、要求源自何處;在 Proxy 伺服器或任何其他伺服器,參與要求;或處理要求的伺服器。

適用於

另請參閱