brokeMyLegBiking
asked on
replace %20 with space
what is the best way to replace all the encoded symbos in a URI to non-encoded.
For example, %20 is a space.
Should I create a URI object and does it have a property "non-encoded" or something like that. currently I am just using the satement:
sFile = sFile.Replace("%20", " ")
but I would like something better.
For example, %20 is a space.
Should I create a URI object and does it have a property "non-encoded" or something like that. currently I am just using the satement:
sFile = sFile.Replace("%20", " ")
but I would like something better.
Is this what you want?
Dim myUri As New Uri("http://www.contoso.com/Hello%20World.htm", True)
Debug.WriteLine(myUri.ToSt ring)
Roger
Dim myUri As New Uri("http://www.contoso.com/Hello%20World.htm", True)
Debug.WriteLine(myUri.ToSt
Roger
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
System.Web.HttpUtility.Url Decode(s)
Bob
Bob
ASKER
brilliant bob, thanks.
Check out the following link: http://msdn2.microsoft.com/en-US/library/system.uri(VS.80).aspx
There is a great deal of information regarding the URI Class, it's properties and methods. There may be a "non-encoded" property/method there, but not by that name (I Looked).