Поделиться через


HttpResponse.SuppressContent Свойство

Определение

Возвращает или задает значение, указывающее, следует ли отправлять http-содержимое клиенту.

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

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