Solved

richtext url with spaces

Posted on 2004-10-20
4
585 Views
Last Modified: 2012-05-05
I have a richtextbox with detecturl true.

I want to add file link to that richtextbox, this is no problem aslong as the filename or directory name doesn't include spaces

does anybody know if it is possible to do this if the name does include spaces
0
Comment
Question by:RonaldBiemans
  • 2
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 500 total points
ID: 12357023
Use "%20" in place of Space
0
 
LVL 25

Author Comment

by:RonaldBiemans
ID: 12357107
That doesn't work, but it gave me an idea on how to make it work, so I'll give you the points
0
 
LVL 19

Expert Comment

by:arif_eqbal
ID: 12366539
So what Idea you came up with???
It might Help Others...

0
 
LVL 25

Author Comment

by:RonaldBiemans
ID: 12367384
Arif_eqbal, You are right. I just replaced the space with another character and then replaced it back when I call the e.linktext, like

Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
        OFD1.ShowDialog()
        RichTextBox1.AppendText(OFD1.FileName.Replace(" ", "%"))
    End Sub

Private Sub RichTextBox1_LinkClicked(ByVal sender As Object, ByVal e As System.Windows.Forms.LinkClickedEventArgs) Handles RichTextBox1.LinkClicked
        System.Diagnostics.Process.Start(e.LinkText.Replace("%", " "))
    End Sub
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 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

9 Experts available now in Live!

Get 1:1 Help Now