Gets additional path information for a resource with a URL extension.
Namespace:
System.Web
Assembly:
System.Web (in System.Web.dll)
Visual Basic (Declaration)
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 ();
}
public function get PathInfo () : String
For the URL Http://www.contoso.com/virdir/page.html/tail, the PathInfo value is /tail.
The following code example determines whether the PathInfo property contains an empty string. If it does, the Write method writes a string indicating this to a file. If it does not, the HtmlEncode method HTML-encodes the value of the PathInfo property and the WriteLine method writes the encoded value to the file. This code example is part of a larger example provided for the HttpRequest class.
' 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
// 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));
}
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.NET Framework
Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Reference