HttpRequest.PathInfo Özellik

Tanım

URL uzantısına sahip bir kaynağın 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

String

Bir kaynağın ek yol bilgileri.

Örnekler

Aşağıdaki kod örneği özelliğin PathInfo boş 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 dosyasına 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'si http://www.contoso.com/virdir/page.html/tailPathInfo için değer /tail değeridir.

Şunlara uygulanır

Ayrıca bkz.