Compartir a través de


HttpResponse.SuppressContent Propiedad

Definición

Obtiene o establece un valor que indica si se debe enviar el contenido HTTP al cliente.

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

Valor de propiedad

Boolean

true para suprimir la salida; en caso contrario, false.

Ejemplos

En el ejemplo siguiente se comprueba si la IsSecureConnection propiedad está establecida en false. Si es así, la SuppressContent propiedad se establece en true para impedir que se envíe la respuesta.

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

Se aplica a