Converting Relative URLs into Absolute URLs

N

Nathan Sokalski

I am using the System.Net.WebClient() and System.Text.UTF8Encoding() classes
to get the output from another page of mine. My basic main algorithm is the
following:

utf8.GetString(source.DownloadData(finalurl))

However, it keeps telling me

Illegal characters in path.

However, the value of finalurl that I am passing is the following:

/Default.aspx?p1=1&p2=2&p3=3

This is definitely a valid relative URL, so I am guessing that I just need
to make it an absolute URL. Is there any method that can change a relative
URL into an absolute one for me so that I don't need to do it manually by
concatenating strings? Thanks.

Nathan Sokalski
(e-mail address removed)
http://www.nathansokalski.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top