I am developing a C # / ASP.Net application, and I am trying to find a way to break down a URL into its component parts, then replace or remove these parts and create a new URL.
For example, if I have the following URL:
I would like to split the url into:
- Protocol (http, https, ftp, etc.)
- Domain (www.site.com)
- Page (page.aspx)
- URL parameters (parm1 = value1, parm2 = value2)
Once the URL is split, I would like to manipulate each of the parts, for example:
- add or remove options
- change parameter value
- change the page from page.aspx to page2.aspx
Then, as soon as I am done, create a new URL ready for use with the above changes.
MSDN .Net, . ?
Cheers,