Displaying URL information: Scheme (VB.net) : URI URL « Response « ASP.Net

Home
ASP.Net
1.ADO.net Database
2.Ajax
3.Asp Control
4.Collections
5.Components
6.Data Binding
7.Development
8.File Directory
9.HTML Control
10.Language Basics
11.Login Security
12.Mobile Control
13.Network
14.Page
15.Request
16.Response
17.Server
18.Session Cookie
19.Sitemap
20.Theme Style
21.User Control and Master Page
22.Validation by Control
23.Validation by Function
24.WebPart
25.WPF
26.XML
ASP.Net » Response » URI URL 




Displaying URL information: Scheme (VB.net)

<%@ Page Language="vb" %>
<html>
   <head>
      <title>Displaying URL information in ASP.NET</title>
   </head>
<body>

<p>

<%
Dim myUri As Uri
myUri = Request.Url

Response.Write("Current request URL info ?<br><br>")
Response.Write("Protocol: " & myUri.Scheme & "<br>")
Response.Write("Port: " & myUri.Port & "<br>")
Response.Write("Host Name: " & myUri.Host & "<br>")

myUri = Request.UrlReferrer

If Not (myUri Is NothingThen
   Response.Write("Referral URL info ?<br><br>")
   Response.Write("Protocol: " & myUri.Scheme & "<br>")
   Response.Write("Port: " & myUri.Port & "<br>")
   Response.Write("Host Name: " & myUri.Host & "<br>")
   Response.Write("App Path: " & myUri.AbsolutePath & "<br>")
Else
   Response.Write("No referral URL info available.")
End If
%>


</p>

</body>
</html>
           
       














Related examples in the same category
1.Creating Absolute URLs for cookieless sessions (VB.net)
2.Displaying URL information: Port (VB.net)
3.Displaying URL information: Host (VB.net)
4.Referral URL info (VB.net)
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.