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 プロパティの PathInfo 値を HTML エンコードし、 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 です。

適用対象

こちらもご覧ください