語言

OutputCacheProfile.NoStore 屬性

定義

取得或設定一個值,表示是否啟用了次級儲存。

public:
 property bool NoStore { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("noStore", DefaultValue=false)]
public bool NoStore { get; set; }
[<System.Configuration.ConfigurationProperty("noStore", DefaultValue=false)>]
member this.NoStore : bool with get, set
Public Property NoStore As Boolean

屬性值

true若啟用次級儲存裝置;否則,。 false 預設值為 false。

屬性

範例

以下程式碼範例說明如何使用該 NoStore 屬性。


// Get the current NoStore.
Boolean noStoreValue = 
    outputCacheProfile.NoStore;

// Set the NoStore.
outputCacheProfile.NoStore = false;
  ' Get the current NoStore.
  Dim noStoreValue As [Boolean] = _
  outputCacheProfile.NoStore

  ' Set the NoStore property.
outputCacheProfile.NoStore = False

備註

設定 OutputCacheProfile.NoStore 該屬性的 true 頁面會發出回應,並在標頭中指定防止敏感資訊的次級儲存。

將此屬性設為 等 true 同於在網頁請求中呼叫該 HttpCachePolicy.SetNoStore 方法。

適用於

另請參閱