Question about Use and formatting of URLs within a RichTextBox

G

Guest

I would like to copy a url to a richtextbox on a form. This particular url
is actually a link to a jpeg sitting on a windows server. I have set the
box's DetectURLs property to true. To make matters more complicated, this
url has spaces in it.

The actual location is as follows: \\<Server
name>\docdirectory\QUALITY\Safety Tm Inspections\Pictures\cabinet.jpg This
will display properly in Internet Explorer.

However in order to get the link to work properly within the richtextbox I
have to enter the link as follows: file://<server
name>/docdirectory/QUALITY/Safety%20Tm%20Inspections/Pictures/cabinet.jpg

Could someone please explain what is happening here or point me to a
relevant reference?
 
G

Guest

The %20 replacement is URL encoding for a space. the % in a URL is an escape
character for a URL and the following 2 digits are hex digits which represent
the ascii character code. In this case its 20 which is 32, the character code
for a space.

This way of doing things is standard URL encoding.
 
G

Guest

The %20 I can understand. It's these two apparently separate formats to the
same file that have me confused (\\<server> vs file://<server>) and more
importantly how to make use of them. (One's a true URL and one's a windows
networking address? It's been a while since my last theory class. :)
 

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

Top