HttpResponse.StatusDescription 속성

정의

클라이언트에 반환되는 출력의 HTTP 상태 문자열을 가져오거나 설정합니다.

public:
 property System::String ^ StatusDescription { System::String ^ get(); void set(System::String ^ value); };
public string StatusDescription { get; set; }
member this.StatusDescription : string with get, set
Public Property StatusDescription As String

속성 값

클라이언트에 반환되는 HTTP 출력의 상태를 설명하는 문자열입니다. 기본값은 "OK"입니다. 유효한 상태 코드 목록은 HTTP 상태 코드를 참조하세요.

예외

HTTP 헤더를 보낸 다음에 StatusDescription가 설정된 경우

선택한 값의 길이가 512보다 큰 경우

예제

다음 예제에서는 출력 스트림의 상태 문자열을 확인합니다. 상태 "OK"와 같지 않으면 추가 코드가 실행됩니다.

if (Response.StatusDescription != "OK")
{
    // ...
}
If Response.StatusDescription <> "OK" Then
    '...
End If

적용 대상