HttpResponse.SuppressContent Vlastnost

Definice

Získá nebo nastaví hodnotu označující, zda se má odeslat obsah HTTP klientovi.

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

Hodnota vlastnosti

Boolean

true potlačení výstupu; falsev opačném případě .

Příklady

Následující příklad zkontroluje, zda IsSecureConnection je vlastnost nastavena na false. Pokud ano, SuppressContent vlastnost je nastavena na hodnotu true, aby se zastavila odeslání odpovědi.

// 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

Platí pro