Uri.Port Property gets the port number of this URI.
Imports System.IO
Imports System.Net
Imports System.Text
publicclass MainClass
Shared Sub Main()
Dim baseUri As New Uri("http://www.yourDomain.com/")
Dim myUri As New Uri(baseUri, "shownew.htm?date=today")
Console.WriteLine(myUri.Port)
End Sub
End Class