ASP.Net/Request/Path

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

Displaying additional path information in ASP.NET

   <source lang="csharp">

<%@ Page Language="vb" %> <html>

  <head>
     <title>Displaying additional path information in ASP.NET</title>
  </head>

<body>

<% Response.Write("File Path = " & Request.FilePath & "
") Response.Write("Path = " & Request.Path & "
") Response.Write("Additional Path Info = " & Request.PathInfo & "
") Response.Write("Physical Application Path = " & Request.PhysicalApplicationPath & "
") Response.Write("Physical Path = " & Request.PhysicalPath) %>

</body> </html>

      </source>
   
  


Displaying the Request.FilePath property in ASP.NET

   <source lang="csharp">

<%@ Page Language="vb" %> <html>

  <head>
     <title>Displaying the Request.FilePath property in ASP.NET</title>
  </head>

<body>

<% Dim fp As String fp = Request.FilePath Response.Write("The virtual path of the current request is: " & fp & "") %>

</body> </html>

      </source>
   
  


Request.PhysicalApplicationPath (C#)

   <source lang="csharp">

<%@ Page Language="c#" %> <html>

 <body>

Response.WriteFile()

   <%;
   
   Response.Write(Request.PhysicalApplicationPath);
   %>
 </body>

</html>

      </source>