Uri for current page (VB.net)
<%@ Page Language=VB Debug=true %>
<script runat=server>
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
Dim TheRef As Uri
TheRef = Request.UrlReferrer
lblMessage1.Text = _
"Port: " & TheRef.Port & "<BR>" _
& "Path: " & TheRef.AbsolutePath & "<BR>" _
& "Protocol: " & TheRef.Scheme & "<BR>" _
& "User Agent: " & Request.UserAgent & "<BR>" _
& "User Host Address: " & Request.UserHostAddress & "<BR>" _
& "User Host Name: " & Request.UserHostName & "<BR>"
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>URI Sample Page</TITLE>
</HEAD>
<BODY >
<form runat="server">
<Font Face="Tahoma">
<asp:Label
id="lblMessage1"
runat="Server"
Font-Bold="True"
/>
</Font>
</Form>
</BODY>
</HTML>
Related examples in the same category