Aracılığıyla paylaş


HttpRequest.PathInfo Özellik

Tanım

URL uzantısına sahip bir kaynak için ek yol bilgilerini alır.

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

Özellik Değeri

Bir kaynağın ek yol bilgileri.

Örnekler

Aşağıdaki kod örneği özelliğin PathInfo boş bir dize içerip içermediğini belirler. Varsa, Write yöntemi bunu bir dosyaya belirten bir dize yazar. Aksi takdirde, HtmlEncode html yöntemi özelliğin PathInfo değerini kodlar ve WriteLine yöntem kodlanmış değeri dosyaya yazar. Bu kod örneği, sınıfı için HttpRequest sağlanan daha büyük bir örneğin parçasıdır.

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

Açıklamalar

URL http://www.contoso.com/virdir/page.html/tailPathInfo için değeri /tail şeklindedir.

Şunlara uygulanır

Ayrıca bkz.