HttpRequest.UrlReferrer 속성

정의

현재 URL에 연결된 클라이언트의 이전 요청 URL에 대한 정보를 가져옵니다.

public:
 property Uri ^ UrlReferrer { Uri ^ get(); };
public Uri UrlReferrer { get; }
member this.UrlReferrer : Uri
Public ReadOnly Property UrlReferrer As Uri

속성 값

Uri

Uri 개체입니다.

예외

HTTP Referer 요청 헤더가 잘못되었으며 Uri 개체로 변환할 수 없습니다.

예제

다음 코드 예제는 클라이언트가 현재 애플리케이션 참조 하는 URL의 두 속성의 값을 표시 합니다.

Uri MyUrl = Request.UrlReferrer;
 Response.Write("Referrer URL Port: " + Server.HtmlEncode(MyUrl.Port.ToString()) + "<br>");
 Response.Write("Referrer URL Protocol: " + Server.HtmlEncode(MyUrl.Scheme) + "<br>");

Dim MyUrl As Uri = Request.UrlReferrer
 Response.Write("Referrer URL Port: " & Server.HtmlEncode(MyUrl.Port.ToString()) & "<br>")
 Response.Write("Referrer URL Protocol: " & Server.HtmlEncode(MyUrl.Scheme) & "<br>")
   

적용 대상