HttpRequest.PathInfo 속성

정의

URL 확장이 있는 리소스에 대한 추가 경로 정보를 가져옵니다.

public:
 property System::String ^ PathInfo { System::String ^ get(); };
public string PathInfo { get; }
member this.PathInfo : string
Public ReadOnly Property PathInfo As String

속성 값

String

리소스에 대한 추가 경로 정보입니다.

예제

다음 코드 예제에서는 속성에 빈 문자열이 PathInfo 포함되어 있는지 여부를 확인합니다. 이 경우 메서드는 Write 이를 나타내는 문자열을 파일에 씁니다. 그렇지 않은 HtmlEncode 경우 메서드 HTML은 속성 값을 PathInfo 인코딩하고 메서드는 WriteLine 인코딩된 값을 파일에 씁니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 HttpRequest 클래스입니다.

// Write the PathInfo property value
// or a string if it is empty.
if (Request.PathInfo == String.Empty)
{
    sw.WriteLine("The PathInfo property contains no information.");
}
else
{
    sw.WriteLine(Server.HtmlEncode(Request.PathInfo));
}
' Write the PathInfo property value
' or a string if it is empty.
If Request.PathInfo = String.Empty Then
    sw.WriteLine("The PathInfo property contains no information.")
Else
    sw.WriteLine(Server.HtmlEncode(Request.PathInfo))
End If

설명

URL http://www.contoso.com/virdir/page.html/tail의 경우 값은 PathInfo /tail입니다.

적용 대상

추가 정보