Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This example demonstrates how to use the System.Uri class to parse a URI.
Example
This example uses several methods of a Uri object to get information about a URI.
Dim uriString As String = "https://www.contoso.com/index.htm?date=today"
Dim uriObject As New Uri(uriString)
' Display "Scheme: http"
MsgBox("Scheme: " & uriObject.Scheme)
' Display "Host: www.contoso.com"
MsgBox("Host: " & uriObject.Host)
' Display "Local path: /index.htm"
MsgBox("Local path: " & uriObject.LocalPath)
' Display "Query: ?date=today"
MsgBox("Query: " & uriObject.Query)