<%@ Page Language="vb" %>
Displaying URL information in ASP.NET
<%
Dim myUri As Uri
myUri = Request.Url
Response.Write("Current request URL info ?
")
Response.Write("Protocol: " & myUri.Scheme & "
")
Response.Write("Port: " & myUri.Port & "
")
Response.Write("Host Name: " & myUri.Host & "
")
myUri = Request.UrlReferrer
If Not (myUri Is Nothing) Then
Response.Write("Referral URL info ?
")
Response.Write("Protocol: " & myUri.Scheme & "
")
Response.Write("Port: " & myUri.Port & "
")
Response.Write("Host Name: " & myUri.Host & "
")
Response.Write("App Path: " & myUri.AbsolutePath & "
")
Else
Response.Write("No referral URL info available.")
End If
%>