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

속성 값

Boolean

출력하지 않으려면 true이고, 그렇지 않으면 false입니다.

예제

다음 예제에서는 속성이 IsSecureConnection false로 설정되었는지 여부를 확인합니다. 이 경우 응답이 SuppressContent 전송되지 않도록 속성이 true로 설정됩니다.

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

적용 대상