PC Review


Reply
Thread Tools Rate Thread

Converting Relative URLs into Absolute URLs

 
 
Nathan Sokalski
Guest
Posts: n/a
 
      11th Aug 2008
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 Removed)
http://www.nathansokalski.com/


 
Reply With Quote
 
 
 
 
Sriram Srivatsan
Guest
Posts: n/a
 
      12th Aug 2008
Look up the URIBuilder class. May help.

"Nathan Sokalski" <(E-Mail Removed)> wrote in message
news:OISvuV$%(E-Mail Removed)...
>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 Removed)
> http://www.nathansokalski.com/
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I Convert relative to absolute URLs within FP2003 =?Utf-8?B?cGhpbGph?= Microsoft Frontpage 2 14th Aug 2006 01:44 PM
relative vs absolute URLs? Flip Microsoft ASP .NET 0 24th Nov 2005 04:53 PM
absolute urls =?Utf-8?B?UmljaEByZA==?= Microsoft Frontpage 1 6th Dec 2004 12:19 PM
Re: FP 2002 Changes Absolute to Relative URLs Thomas A. Rowe Microsoft Frontpage 0 30th Jun 2004 11:10 PM
FrontPage 2002 changing absolute URL on Images to relative URLs =?Utf-8?B?REJL?= Microsoft Frontpage 7 22nd May 2004 07:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:39 AM.