Manipulate a URI
Problem
You want to retrieve a portion of a URI (such as the prefix, directory, page, or query string arguments).
Solution
Process the URI using the System.Uri class.
Discussion
As with file path information, URIs can be written in several different forms, and represent several types of information, including Web requests (http:// and https://), FTP requests (ftp://), files (file://), news (news://), e-mail (mailto://), and so on. The Uri class provides a generic way to represent and manipulate URIs. You create a Uri instance by supplying a string that contains an absolute URI.
Dim MyUri As New Uri("http://search.yahoo.com/bin/search?p=dog")
The Uri class converts the supplied string into a standard form by taking the following steps, ...
Get Microsoft® Visual Basic® .NET Programmer's Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.