Partage via


OutputCacheProfile.NoStore Propriété

Définition

Obtient ou définit une valeur indiquant si le stockage secondaire est activé.

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

Valeur de propriété

Boolean

true si le stockage secondaire est activé ; sinon false. La valeur par défaut est false.

Attributs

Exemples

L'exemple de code suivant montre comment utiliser la propriété 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

Remarques

La page sur laquelle la OutputCacheProfile.NoStore propriété est définie true émet une réponse spécifiant dans son en-tête pour empêcher le stockage secondaire d’informations sensibles.

La définition de true cet attribut équivaut à appeler la HttpCachePolicy.SetNoStore méthode pendant une requête Web.

S’applique à

Voir aussi