HttpResponse.RedirectLocation 속성

정의

HTTP Location 헤더의 값을 가져오거나 설정합니다.

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

속성 값

String

HTTP Location 헤더에서 클라이언트로 전송되는 절대 URI입니다.

예외

HTTP 헤더가 이미 기록되었습니다.

예제

다음 예제에서는 HTTP 301 응답 코드를 사용하여 영구 리디렉션을 코딩할 때 이 속성을 사용하여 리디렉션 URL을 지정하는 방법을 보여 있습니다.

Response.StatusCode = 301;
Response.Status = "301 Moved Permanently";
Response.RedirectLocation = "http://www.newurl.com ";
Response.End();

적용 대상