Manipulate URIs with Visual Studio .NET's System.URI class
Takeaway: Irina Medvinskaya explains how you use Visual Studio .NET's System.URI class to work with Uniform Resource Identifiers (URIs). This class allows you to represent and easily manipulate a given URI.
Uniform Resource Identifiers (URIs) may represent Web requests, FTP requests, files, news, and e-mail. Whenever you need to work with URIs and determine a particular portion of a given URI, you can utilize the System.URI class available in Visual Studio .NET. This class allows you to represent and easily manipulate a given URI.
To create an example, add a ListBox control to your form and call it ListBox1. Then, add the code in Listing A. The result of running this code looks like Figure 1.
In the code, I initially define a strURI variable and set its value to a link from the TechRepublic site. Then, I add the following properties of the URI object strURI to the ListBox1 control: Scheme, Host, Path, Query, Type, Port. The ListBox1 control simply displays the selected properties of the strURI object.
Miss a tip?
Check out the Visual Basic archive, and catch up on the most recent editions of Irina Medvinskaya's column.
Advance your scripting skills to the next level with TechRepublic's free Visual Basic newsletter, delivered each Friday. Automatically sign up today!
Print/View all Posts Comments on this article
|
|
|
|
White Papers, Webcasts, and Downloads
- July 7th: The Virtual Presenter's Series: Start Right! Design Right!P resent Right! Citrix Online Presenting online is a completely different ballgame from presenting in ... Download Now
- IBM Smart Business Time Savings Test IBM If time is money - is your organization in need of a way to save both? ... Download Now
- Finally, an Easier Way for Small and Mid-Sized Companies to Run Their Business Applications: IBM Smart Business IBM From the PC to the Internet to every piece of hardware and software in ... Download Now
- Unrivaled support from Novell, now available for Red Hat Novell If Linux is going to power your mission-critical applications, you'd ... Download Now
- Dell Delivers Innovative Mobile at Saint Cecilia's Wandsworth Church of England School Dell Saint Cecilia's was a new school that wanted to place ICT at the core of ... Download Now
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET

