replace %20 with space

Posted on 2006-03-27
Last Modified: 2012-06-27
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.
Question by:brokeMyLegBiking
    LVL 6

    Expert Comment

    I think your method is a good way to format the URI.  You can store these symbols in a resource file or table and add some logic to search for the symbol and replace with the correct "non-encoded" version.  

    Check out the following link:

    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).

    LVL 34

    Expert Comment

    Is this what you want?

            Dim myUri As New Uri("", True)

    LVL 96

    Accepted Solution


    LVL 96

    Expert Comment

    by:Bob Learned

    LVL 4

    Author Comment

    brilliant bob, thanks.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
    Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now