HttpResponse.SuppressContent Propriété

Définition

Obtient ou définit une valeur indiquant si le contenu HTTP doit être envoyé au client.

public:
 property bool SuppressContent { bool get(); void set(bool value); };
public bool SuppressContent { get; set; }
member this.SuppressContent : bool with get, set
Public Property SuppressContent As Boolean

Valeur de propriété

Boolean

true pour supprimer la sortie, sinon false.

Exemples

L’exemple suivant vérifie si la propriété a la IsSecureConnection valeur false. Si c’est le cas, la SuppressContent propriété a la valeur true pour empêcher l’envoi de la réponse.

// Check whether the request is sent
// over HTTPS. If not, do not send 
// content to the client.    
if (!Request.IsSecureConnection)
{
    Response.SuppressContent = true;
}
' Check whether the request is sent
' over HTTPS. If not, do not return
' content to the client.
If (Request.IsSecureConnection = False) Then      
    Response.SuppressContent = True
End If

S’applique à