HttpRequest.PathInfo プロパティとは何? わかりやすく解説 Weblio辞書 (original) (raw)
名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)
構文
Public ReadOnly Property PathInfo As String
Dim instance As HttpRequest Dim value As String
value = instance.PathInfo
public string PathInfo { get; }
public: property String^ PathInfo { String^ get (); }
/** @property */ public String get_PathInfo ()
public function get PathInfo () : String
URL が Http://www.contoso.com/virdir/page.html/tail の場合は、**PathInfo** 値が /tail になります。
PathInfo プロパティに空の文字列が格納されているかどうかを確認するコード例を次に示します。空の文字列が格納されている場合は、Write メソッドによって、これを示す文字列がファイルに書き込まれます。空の文字列ではない場合は、HtmlEncode メソッドによって PathInfo プロパティの値が HTML エンコードされ、エンコードされた値が WriteLine メソッドによってファイルに書き込まれます。このコード例は、HttpRequest クラスのトピックで取り上げているコード例の一部分です。
' Iterate through the Form collection and write ' the values to the file with HTML encoding. For Each s As String In Request.Form sw.WriteLine("Form: " & Server.HtmlEncode(s)) Next s
// Iterate through the Form collection and write // the values to the file with HTML encoding. // String[] formArray = Request.Form.AllKeys; foreach (string s in Request.Form) { sw.WriteLine("Form: " + Server.HtmlEncode(s)); }
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。