HttpResponse.SuppressContent Свойство

Определение

Получает или задает значение, показывающее, следует ли отправить содержимое НТТР клиенту.

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

Значение свойства

Значение true для подавления вывода; в противном случае — значение false.

Примеры

В следующем примере проверяется, установлено ли IsSecureConnection для свойства значение false. Если это так, свойство имеет значение true, SuppressContent чтобы остановить отправку ответа.

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

Применяется к